3 # Get the current dotfiles from the server using a variety of methods.
5 # In order of decreasing preference:
6 # if we have git installed
7 # git over ssh, if there is an ssh agent running
12 # The default ssh url is stored in .git/config, so we don't need it here
13 http="http://einstein.physics.drexel.edu/~wking/code/git/dotfiles.git"
14 tgz="http://einstein.physics.drexel.edu/~wking/code/tar/dotfiles.tgz"
17 # Check for Git (versioning system) so we know how to get our .dotfiles
24 # Check for a SSH agent
25 if [ -n "$SS_AUTH_SOCK" ] && [ -n "$SSH_AGENT_PID" ]; then
31 if [ $GIT_INSTALLED == "true" ]; then
32 if [ $SSH_AGENT == "true" ]; then
35 git pull $http master || exit 1
38 # fallback on wgetting the tarball
40 wget --output-document dotfiles.tgz $tgz || exit 1
41 tar -xzvf dotfiles.tgz || exit 1
42 rm -rf dotfiles.tgz || exit 1