Created
August 19, 2013 19:43
-
-
Save warmwaffles/6273177 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
function show_usage() { | |
echo "Usage: prep <gemset> [ruby=2.0.0] [directory=gemset]" | |
echo " - <gemset> the directory it is in. If it is not in that directory" | |
echo " please specify one." | |
echo " - [ruby] the version of ruby you want to use. Default is 2.0.0" | |
echo " - [directory] the directory the gemset. Default is the gemset" | |
} | |
if [ -z "$1" ] | |
then | |
show_usage | |
exit 1 | |
fi | |
gemset=$1 | |
version="2.0.0" | |
if [ -n "$2" ] | |
then | |
version=$2 | |
fi | |
directory=$gemset | |
if [ -n "$3" ] | |
then | |
directory=$3 | |
fi | |
echo "VERSION=$version" | |
echo $version > $directory/.ruby-version | |
echo "GEMSET=$gemset" | |
echo $gemset > $directory/.ruby-gemset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment