Source

dotfiles / install

Full commit
#!/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|install|install.bat|update_subrepos|bootstrap_mac.sh|install_distribute.py)
do 
    echo ${DOTFILE}
    TARGET="${HOME}/${DOTFILE}"
    rm -rf "${TARGET}"
    ln -sf "${DOTDIR}/${DOTFILE}" "${TARGET}"
done
popd &> /dev/null

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

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 cpan App::Ack