Skip to content

Instantly share code, notes, and snippets.

@Bidthedog
Last active August 29, 2015 13:55
Show Gist options
  • Save Bidthedog/8787891 to your computer and use it in GitHub Desktop.
Save Bidthedog/8787891 to your computer and use it in GitHub Desktop.
#!/bin/bash
baseDirs=( /d/Git/ /d/Projects/ )
let i=1
echo
echo "Pulling git repositories..."
echo
for baseDir in "${baseDirs[@]}"; do
cd $baseDir
echo "$((i++)) - Base directory '$baseDir'"
for dir in $(echo $baseDir*/); do
cd $dir
echo "git pull of $dir"
git pull
echo
echo "==========================================="
echo
cd ..
done
echo
echo "Done"
done
# for i in $(echo */); do
# cd $i
# echo "git pull inside $i"
# git pull
# echo ---------------------------
# cd ..
# done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment