Browse Source

Add initial update helper

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 11 years ago
parent
commit
b7aec3e072
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      update.sh

+ 19
- 0
update.sh

@ -0,0 +1,19 @@
#!/bin/sh
cd "$(dirname "$0")"
if [ "$(git ls-files -mdo)" ]; then
updated=true
git stash -q
else
updated=false
fi
echo "== $PWD =="
git pull -q --rebase
if $updated; then
git stash pop -q
fi
[ $# -eq 0 ] || exec "$@"

Loading…
Cancel
Save