Skip to content

Instantly share code, notes, and snippets.

@noahd1
Created December 9, 2010 15:33
Show Gist options
  • Save noahd1/734839 to your computer and use it in GitHub Desktop.
Save noahd1/734839 to your computer and use it in GitHub Desktop.
cloudssh
#!/bin/bash
# usage: cloudssh
# ssh's into the build master
# usage: cloudssh {0|1|2}
# ssh's into one of the testjour slaves
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi
cd ~/p/weplay-cloudbuild
case "$1" in
"")
./bin/cloud ssh
;;
[0-2])
./bin/cloud ssh -n testjour_slaves -i $1
;;
*)
echo $"Usage: $0 {0|1|2}"
exit 1
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment