Permalink
Browse files

Simplify clone/update of repo during install.

  • Loading branch information...
jasoncodes committed Dec 3, 2012
1 parent 7f605d1 commit 45d3c17194035b4f88bbcdffeb3ab5267a62ee30
Showing with 9 additions and 16 deletions.
  1. +9 −16 install.sh
View
@@ -1,22 +1,15 @@
#!/bin/bash -e
cd
-[ -d .dotfiles ] || git clone git://github.com/jasoncodes/dotfiles.git .dotfiles
-(
- set -e
- cd .dotfiles
-
- TEMPFILE="`mktemp -t install.XXXXXX`"
- trap '{ rm -f "$TEMPFILE"; }' EXIT
-
- set +e
- git fetch origin
- git show origin/master:profile > "$TEMPFILE"
- source "$TEMPFILE"
- set -e
-
- gup
-)
+if [ -d ~/.dotfiles ]; then
+ if type -t git-up > /dev/null; then
+ (cd ~/.dotfiles && git-up)
+ else
+ (cd ~/.dotfiles && git pull --rebase)
+ fi
+else
+ git clone git://github.com/jasoncodes/dotfiles.git ~/.dotfiles
+fi
function create_link()
{

0 comments on commit 45d3c17

Please sign in to comment.