Last active
March 9, 2017 14:34
-
-
Save just3ws/b054e8aabc09fc8ac1e7015ff39542b8 to your computer and use it in GitHub Desktop.
Update git repos and install bundler if not present
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
echo "BEGIN updating: $(pwd)" | |
cd "$1/.." | |
git fetch --all --prune --verbose | |
[[ -a Gemfile && "$(gem query --installed '^bundler$')" == 'false' ]] && gem install bundler --no-document | |
bundle check || bundle install | |
echo "END updating: $(pwd)" | |
echo |
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
function refresh-ruby-repos () { | |
~/./bin/refresh-ruby-repos.zsh | |
} |
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
find . -maxdepth 2 -type d -name '.git' -exec refresh-ruby-repo.zsh "{}" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment