1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/bash WD=$([ "x" == "x$1" ] && echo $PWD || echo $1) GITS=$(find $WD -type d | egrep '\.git$') echo $GITS exit 0 for i in $GITS do cd $i git pull done