Last active
December 14, 2015 19:29
-
-
Save leonelgalan/5137209 to your computer and use it in GitHub Desktop.
Downloads my sinatra_base repository and renames it to the desired name. Usage: `curl https://raw.github.com/gist/5137209 | bash -s project_name`
This file contains 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 | |
wget https://github.com/leonelgalan/sinatra_base/archive/master.zip | |
unzip master.zip | |
rm master.zip | |
mv sinatra_base-master $1 | |
LAST_RUBY=`curl 'http://ftp.ruby-lang.org/pub/ruby/1.9/' 2> /dev/null | ruby -e 'puts STDIN.lines.map { |x| /1\.9\.3-p\d+\b/.match(x) }.compact.last[0]'` | |
echo $LAST_RUBY > $1/.ruby-version | |
echo $1 > $1/.ruby-gemset | |
unset LAST_RUBY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment