cmd=$1
shift
+case "$0" in
+ */*)
+ cd "${0%/*}"
+ ;;
+esac
+
d0=`pwd`
case "$cmd" in
update|pull)
cd "$d0/$d"
r=`git symbolic-ref HEAD`
r=${r#refs/heads/}
- a=
if git diff HEAD | grep .; then
# we have uncommitted changes
+ a=
while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
echo "Uncommitted changes in \"$r\" in \"$d\". Commit?"
read -r a
fi
fi
if git log "origin/$r".."$r" | grep .; then
+ a=
while [ x"$a" != x"y" -a x"$a" != x"n" ]; do
echo "Push \"$r\" in \"$d\"?"
read -r a