git-update-all (335B)
1 #!/bin/sh 2 # Update all git repos in current folder 3 4 for i in *; do 5 if test -d "$i/.git"; then 6 cd "$i" 7 echo "[$i] updating" 8 git remote update 9 git pull --rebase 10 if test $? -eq 1; then 11 echo "[$i] backing out rebase, fix manually" 12 git rebase --abort 13 fi 14 cd - >/dev/null 15 else 16 echo "[$i] not a git repo" 1>&2 17 fi 18 done