I'm trying to write a script that I can add to later on. Basically, I have a collection of git repos all over my home directory. I'd like to keep a master list of their locations and then have a script run through them all and run a
git up command or
git pull or something.
I'm tired of having to
cd into everything individually to get it to update. I'd like to do it all at once, but there's no rhyme or reason to their locations, and I'd prefer not to restructure my home folder tree just to accommodate some scripting action.
I'm more than happy to have this like a config file where I can simply append more directories to the beginning of the file as needed over time.
Here's where I'm at:
CWD="$(pwd)"; cd ; dir1="$HOME/FW/foo"; dir2="$HOME/FW/bar"; for repo in $dir1, $dir2; do cd "$repo" git up done cd $CWD
Oh, and I'm using ZSH, not bash...