Skip to content

Instantly share code, notes, and snippets.

@fidothe
Created May 3, 2011 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fidothe/953126 to your computer and use it in GitHub Desktop.
Save fidothe/953126 to your computer and use it in GitHub Desktop.
run git pull / push / status in all child folders which are git repositories; run bundle install in all child folders which have Gemfiles
#!/bin/bash
for i in `find . -name Gemfile -depth 2 | xargs -n1 dirname`
do
pushd $i
bundle install
popd
done
#!/bin/bash
for i in `find . -name .git -depth 2 | xargs -n1 dirname`
do
pushd $i
git pull
popd
done
#!/bin/bash
for i in `find . -name .git -depth 2 | xargs -n1 dirname`
do
pushd $i
git push
popd
done
#!/bin/bash
for i in `find . -name .git -depth 2 | xargs -n1 dirname`
do
pushd $i
git status -uno -s
popd
done
@heynemann
Copy link

nicely done! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment