Created
October 1, 2018 20:23
-
-
Save taywils/51ec7327b7c629b4dd855b2c88e45f52 to your computer and use it in GitHub Desktop.
Git projects
This file contains 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
if echo $PWD | grep -e "./projects"; then | |
allArgs="$*" | |
basedir=$PWD | |
for curdir in */; do | |
cd $curdir | |
if test -d ./.git | |
then | |
echo "\n\n${curdir}\n\n" | |
git ${allArgs} | |
fi | |
cd $basedir | |
done | |
else | |
echo 'This script must be ran from within your ~/projects directory' | |
echo 'Change directories until you get there and run it again' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment