public
Last active

Shell script to check multiple git repositories for updates.

  • Download Gist
update-gits.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/bin/bash
 
repos=(
"/Users/rob/Library/Application Support/TextMate/Bundles/Git.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/RubyAMP.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby Haml.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-sass.tmbundle"
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-shoulda.tmbundle"
)
 
echo "Checking" ${#repos[@]} "repositories for updates"
 
for repo in "${repos[@]}"
do
echo "updating" ${repo}
cd "${repo}"
git pull
done

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.