Created
June 11, 2013 22:36
-
-
Save ggarnier/5761385 to your computer and use it in GitHub Desktop.
Checks the status for all my git projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check-git-status.sh - Checks the status for all my git projects | |
# Usage: check-git-status.sh <main projects directory> | |
if [ -z "$1" ]; then | |
mainDir="$HOME/Projects" | |
else | |
mainDir="$1" | |
fi | |
for dir in `ls -d1 $mainDir/*/` | |
do | |
cd $dir | |
status=`git status -s 2> /dev/null` | |
if [ -n "$status" ]; then | |
echo -e "[$dir]\n$status\n" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment