Skip to content

Instantly share code, notes, and snippets.

@rodolfoliviero
Forked from marcosinger/gist:2722199
Created May 17, 2012 23:13
Show Gist options
  • Save rodolfoliviero/2722202 to your computer and use it in GitHub Desktop.
Save rodolfoliviero/2722202 to your computer and use it in GitHub Desktop.
Cloning all listed projects, creating a gemset and runs Bundle install
#!/bin/bash
current_path=`pwd`
projects=(webdesk/webdesk webdesk/webdesk-provisioner webdesk/webdesk-product-api
webchat/webchat webchat/webchat-provisioner webchat/webchat-product-api
pabx-virtual/pabx-virtual-2011 pabx-virtual/pabx-provisioner
pabx-virtual/pabx-product-api pabx-virtual/ruby_pabx_core
saas_plan_config/saas_plan_config
locaweb-utilities/x9 package_pipeline/package_pipeline
product-apify/product-apify feed_consumer/feed_consumer
product-api/product-api sapi_client/sapi_client
sap-web-api/sap-web-api customer-workbench/customer-workbench)
for p in ${projects[@]}; do
project_name=`echo $p | tr "/" "\n" | awk 'NR == 2'`
git clone git@github.com:$p.git
cd_cmd="cd $current_path/$project_name"
$cd_cmd
if test -f Gemfile; then
if test -f ~/.rvm/scripts/rvm; then
[ "$(type -t rvm)" = "function" ] || source ~/.rvm/scripts/rvm
rvm use 1.9.2@$project_name --create
cp .rvmrc.example .rvmrc
bundle install
fi
fi
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment