Created
June 30, 2014 07:36
-
-
Save xnzac/b6d8eddfe60042168d36 to your computer and use it in GitHub Desktop.
bundle_install_taobao.sh
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
# Simple script to replace first line of Gemfile with taobao's rubygem mirror url | |
# save as ~/bin/bundle_install_taobao.sh | |
# create alias in ~/.zsh_alias: alias bi='bash ~/bin/bundle_install_taobao.sh' | |
# run 'bi' from project folder | |
echo "Copying Gemfile to Gemfile_taobao using ruby.taobao.org" | |
echo | |
taobao="'source http\:\/\/ruby.taobao.org'" | |
sed "1s/.*/$taobao/" Gemfile > Gemfile_taobao | |
echo "bundle install --gemfile Gemfile_taobao" | |
bundle install --gemfile Gemfile_taobao | |
echo "moving Gemfile_taobao.lock to Gemfile.lock" | |
mv Gemfile_taobao.lock Gemfile.lock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment