script/bootstrap in dvl-flashes-0.0.1 vs script/bootstrap in dvl-flashes-0.0.2
- old
+ new
@@ -19,23 +19,25 @@
printf "\nDependency check failed, file not in PATH: $i\n"
exit 1
fi
done
-## Create .ruby-gemset if it doesn't exist
-printf "Checking for .ruby-gemset... "
+if [ -d ~/.rvm ]; then
+ ## Create .ruby-gemset if it doesn't exist
+ printf "Checking for .ruby-gemset... "
-if [ ! -f .ruby-gemset ]; then
- printf "\nWriting .ruby-gemset..."
- printf 'dvl-flashes' >> .ruby-gemset
-fi
+ if [ ! -f .ruby-gemset ]; then
+ printf "\nWriting .ruby-gemset..."
+ printf 'dvl-flashes' >> .ruby-gemset
+ fi
-printf "OK\n"
+ printf "OK\n"
-## Ensure RVM is using our ruby + gemset
-source ~/.rvm/scripts/rvm
-rvm use `cat .ruby-version`
-rvm gemset use --create `cat .ruby-gemset`
+ ## Ensure RVM is using our ruby + gemset
+ source ~/.rvm/scripts/rvm
+ rvm use `cat .ruby-version`
+ rvm gemset use --create `cat .ruby-gemset`
+fi
## Bundle
printf "Bundling...\n"
bundle install