Skip to content

Instantly share code, notes, and snippets.

@jeswin
Created December 24, 2015 09:52
Show Gist options
  • Save jeswin/639f87c651d8c877dee5 to your computer and use it in GitHub Desktop.
Save jeswin/639f87c651d8c877dee5 to your computer and use it in GitHub Desktop.
git-status-all-my-repos.sh
#!/bin/bash
runtask() {
curdir=`pwd`
declare -a projects=("${!1}") #don't we just love bash arrays?
for proj in "${projects[@]}"
do
echo checking ${proj}...
if [ -d $proj ]; then
cd $proj
git status
cd $curdir
else
echo $proj does not exist, skipped.
fi
echo
done
}
echo Git Status
echo ==========
my_projects=(
"crankshaft"
"ceramic"
"fora"
"isotropy"
"isotropy-mount"
"isotropy-static"
"isotropy-router"
"isotropy-plugin-react"
"isotropy-adapter-react"
"isotropy-adapter-react-browser"
"isotropy-plugin-graphql"
"isotropy-plugin-webapp"
"isotropy-plugin-static"
"isotropy-backend-mongodb"
"isotropy-backend-nedb"
"nedb-isotropy"
"nodefunc-promisify"
"nodefunc-generatorify"
)
runtask my_projects[@]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment