3 # Get the current dotfiles from the server using a variety of methods.
5 # If there is a .git directory in $DOTFILES_DIR, use `git pull`,
6 # otherwise use wget to grab a tarball.
8 if [ -z "${DOTFILES_DIR}" ]; then
9 echo 'DOTFILES_DIR is not set. Bailing out.'
13 cd "${DOTFILES_DIR}" || exit 1
15 # Check for Git (versioning system) so we know how to get our .dotfiles
19 # fallback on wgetting the tarball
20 if [ -z "${DOTFILES_TGZ}" ]; then
21 echo 'DOTFILES_TGZ is not set. Bailing out.'
24 wget --output-document dotfiles.tgz "${DOTFILES_TGZ}" || exit 1
25 tar -xzvf dotfiles.tgz || exit 1
26 rm -rf dotfiles.tgz || exit 1