echo "We gotta install Flombe first. I'll do that for you, don't worry." mkdir -p ~/.flombe echo "Run started on `date`" >> ~/.flombe/bootstrap.log 2>&1 which ruby >> ~/.flombe/bootstrap.log 2>&1 which gem >> ~/.flombe/bootstrap.log 2>&1 which gem | grep -q rvm if [ $? -eq 0 ]; then gem uninstall flombe -aIx >> ~/.flombe/bootstrap.log 2>&1 gem install flombe --no-rdoc --no-ri >> ~/.flombe/bootstrap.log 2>&1 else echo "=> We've got to run sudo to access rubygems. Flombe's recipes will be installed on the current user." sudo gem uninstall flombe -aIx >> ~/.flombe/bootstrap.log 2>&1 sudo gem install flombe --no-rdoc --no-ri >> ~/.flombe/bootstrap.log 2>&1 echo "=> We also need to update your gems. This may take a while if your connection sux." sudo gem update >> ~/.flombe/bootstrap.log 2>&1 fi echo "Flombe gem installed. Going to run a base install with homebrew and rvm." if [ -f ~/.flombe/Flombefile ]; then rm ~/.flombe/Flombefile fi echo 'recipe "homebrew"' >> ~/.flombe/Flombefile echo 'recipe "rvm"' >> ~/.flombe/Flombefile echo 'recipe "utils"' >> ~/.flombe/Flombefile echo 'recipe "utils::dotfiles"' >> ~/.flombe/Flombefile echo 'recipe "utils::colors"' >> ~/.flombe/Flombefile echo 'recipe "utils::keyfixer"' >> ~/.flombe/Flombefile cd ~/.flombe && flombe | tee -a ~/.flombe/bootstrap.log echo "Flombe successful at `date`" >> ~/.flombe/bootstrap.log 2>&1 if [ "$?" -eq "0" ]; then echo -e "\033[1;32mFlombe run was successful! :)\033[0m" echo -e "\033[0;32mPlease open a new terminal window to have maximum goodness.\033[0m" fi if [ -f ~/.flombe.profile ]; then source ~/.flombe.profile fi if [ -f ~/.bash_profile ]; then source ~/.bash_profile fi