Skip to content

Instantly share code, notes, and snippets.

@just3ws
Last active March 9, 2017 14:34
Show Gist options
  • Save just3ws/b054e8aabc09fc8ac1e7015ff39542b8 to your computer and use it in GitHub Desktop.
Save just3ws/b054e8aabc09fc8ac1e7015ff39542b8 to your computer and use it in GitHub Desktop.
Update git repos and install bundler if not present
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
function refresh-ruby-repos () {
~/./bin/refresh-ruby-repos.zsh
}
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