Created
October 26, 2010 19:50
-
-
Save gmcinnes/647636 to your computer and use it in GitHub Desktop.
Installs LionTamer to your machine
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
echo "" | |
echo "TAMING YOUR LION" | |
echo "This may take a while. Don't panic" | |
echo "" | |
# Use the system ruby for now, if rvm is installed | |
if [ "`which rvm`" != "" ]; then | |
rvm use system | |
fi | |
if [ "`which chef-solo`" == "" ]; then | |
echo "Chef not found. Installing Chef to system library. You'll need your sudo password to do this:" | |
sudo gem install chef --no-ri --no-rdoc | |
else | |
echo "Updating to the latest Chef" | |
gem update chef --no-ri --no-rdoc | |
fi | |
rm -rf ~/LionTamer | |
mkdir ~/LionTamer | |
cd ~/LionTamer && /usr/bin/curl -sSfL https://github.com/gmcinnes/LionTamer/tarball/master | /usr/bin/tar xz -m --strip 1 | |
if [ "`which chef-solo`" == "" ]; then | |
echo "I still can't find chef-solo. Probably installed to ~/.gem. Trying that." | |
cd ~/LionTamer && /Users/`whoami`/.gem/ruby/1.8/bin/chef-solo -j config/run_list.json -c config/solo.rb | |
else | |
cd ~/LionTamer && chef-solo -j config/run_list.json -c config/solo.rb | |
fi | |
cd ~ && rm -rf ~/LionTamer | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment