Commits

Woojong Koh committed 5304008

Add .virtualenvs directoy and hooks

Comments (0)

Files changed (6)

.virtualenvs/postactivate

+#!/bin/env zsh
+# This hook is run after every virtualenv is activated.
+
+rehash

.virtualenvs/postdeactivate

+#!/bin/env zsh
+# This hook is run after every virtualenv is deactivated.
+
+rehash
 
 # virtualenvwrapper
 export WORKON_HOME=$HOME/.virtualenvs
-export PROJECT_HOME=$HOME/Devel
-source /usr/local/bin/virtualenvwrapper.sh
+mkdir -p WORKON_HOME
+source virtualenvwrapper.sh
 
 # Use MacVim if it exists
 if hash mvim &> /dev/null; then

bin/bootstrap_mac.sh

-#!/bin/sh
+#!/bin/env bash
 
 xcodebuild -license
 sudo xcodebuild -license
     echo $EXPORT_STMT >> $HOSTNAMES_FILE
 fi
 
+# http://mercurial.selenic.com/wiki/CACertificates
+echo
+echo "* Generating a dummy certificate..."
+if [ ! -f /etc/hg-dummy-cert.pem ]; then
+    openssl req -new -x509 -extensions v3_ca -keyout /dev/null -out dummycert.pem -days 3650
+    sudo mv dummycert.pem /etc/hg-dummy-cert.pem
+fi
+
 # Update MacPorts
 sudo port selfupdate
 sudo port upgrade outdated
 
 # Install compilers and utilities
 sudo port install autojump
+sudo port install boost
 sudo port install ccache
 sudo port install ctags
 sudo port install gcc47
 sudo port install glew
 #sudo port install jpeg
 #sudo port install freetype
+#sudo port install libpng
 
 # Install MacVim

install

-#!/bin/bash
-
-DOTDIR="$( cd -P "$( dirname "$0" )" && pwd )"
-pushd "${DOTDIR}" &> /dev/null
-
-echo "* Installing dotfiles..."
-
-shopt -s dotglob extglob
-for DOTFILE in !(.hg|.hgsub|.hgsubstate|.hgignore|tags|install|install.bat)
-do 
-    echo ${DOTFILE}
-    TARGET="${HOME}/${DOTFILE}"
-    rm -rf "${TARGET}"
-    ln -sf "${DOTDIR}/${DOTFILE}" "${TARGET}"
-done
-
-rm -rf "${HOME}/.weechat/irc.conf"
-ln -sf "${HOME}/Dropbox/Mac Sync/weechat/irc.conf" "${HOME}/.weechat/irc.conf"
-popd &> /dev/null
-
-echo
-echo "* Changing a login shell to ZSH..."
-chsh -s /bin/zsh
-
-echo
-echo "* Generating a dummy certificate..."
-
-# http://mercurial.selenic.com/wiki/CACertificates
-if [ ! -f /etc/hg-dummy-cert.pem ]; then
-    openssl req -new -x509 -extensions v3_ca -keyout /dev/null -out dummycert.pem -days 3650
-    sudo mv dummycert.pem /etc/hg-dummy-cert.pem
-fi
-
-echo
-echo "* Installing distribute and pip..."
-curl -O http://python-distribute.org/distribute_setup.py
-sudo python distribute_setup.py
-sudo easy_install --upgrade pip
-rm distribute_setup.py
-sudo rm distribute-*.tar.gz
-
-echo
-echo "* Installing Mercurial..."
-sudo pip install --upgrade mercurial
-
-echo
-echo "* Installing extensions..."
-sudo pip install --upgrade keyring
-sudo pip install --upgrade hg-git
-sudo pip install --upgrade gntp
-
-echo
-echo "* Installing virtualenv..."
-sudo pip install --upgrade virtualenv
-sudo pip install --upgrade virtualenvwrapper
-
-echo
-echo "* Installing SCons..."
-sudo pip install --upgrade scons
-
-echo
-echo "* Installing Ack..."
-sudo /usr/bin/cpan App::Ack
+#!/bin/env bash
+
+DOTDIR="$( cd -P "$( dirname "$0" )" && pwd )"
+pushd "${DOTDIR}" &> /dev/null
+
+echo "* Installing dotfiles..."
+
+shopt -s dotglob extglob
+for DOTFILE in !(.hg|.hgsub|.hgsubstate|.hgignore|tags|install|install.bat)
+do
+    echo ${DOTFILE}
+    TARGET="${HOME}/${DOTFILE}"
+    rm -rf "${TARGET}"
+    ln -sf "${DOTDIR}/${DOTFILE}" "${TARGET}"
+done
+
+rm -rf "${HOME}/.weechat/irc.conf"
+ln -sf "${HOME}/Dropbox/Mac Sync/weechat/irc.conf" "${HOME}/.weechat/irc.conf"
+popd &> /dev/null
+
+echo
+echo "* Changing a login shell to ZSH..."
+chsh -s /bin/zsh
+
+PIP=sudo pip
+if [ -z "$VIRTUAL_ENV" ]; then
+    echo
+    echo "* Installing distribute and pip..."
+    curl -O http://python-distribute.org/distribute_setup.py
+    sudo python distribute_setup.py
+    sudo easy_install --upgrade pip
+    rm distribute_setup.py
+    rm distribute-*.tar.gz
+else
+    PIP=pip
+fi
+
+echo
+echo "* Installing Mercurial..."
+$PIP install --upgrade mercurial
+$PIP install --upgrade gntp hg-git keyring
+
+echo
+echo "* Installing virtualenv..."
+$PIP install --upgrade virtualenv virtualenvwrapper
+
+echo
+echo "* Installing SCons..."
+$PIP install --upgrade scons
+
+echo
+echo "* Installing iPython and numpy/scipy..."
+$PIP install --upgrade ipython ipdb
+$PIP install --upgrade numpy scipy matplotlib
+
+echo
+echo "* Installing Ack..."
+sudo /usr/bin/cpan App::Ack