Permalink
Browse files

audit. proper installation instructions in place.

  • Loading branch information...
paulirish committed Sep 14, 2012
1 parent 0bda2da commit 6c6e76d935865d2626ff5028a5cc943aea3da35f
Showing with 35 additions and 18 deletions.
  1. +35 −18 setup/audit.sh
View
@@ -63,6 +63,7 @@ happy_print(){
echo ""
echo "Wotcha! Well hi there. "
echo "Thanks for installing Yeoman."
+echo ""
echo "Below is a quick audit I've run on your system to see if you have everything you need for Yeoman:
"
@@ -131,42 +132,58 @@ echo ""
# passes
if [[ "$mac" = 1 ]]; then
- [ "$cli" -eq 1 ] && happy_print "xcode cli tools" "are installed."
- [ "$brew" -eq 1 ] && happy_print "homebrew" "is installed."
+ [ "$cli" -eq 1 ] && happy_print "Command Line Tools for Xcode" "are installed! "
+ [ "$brew" -eq 1 ] && happy_print "Homebrew" "is installed."
fi
if [[ "$linux" = 1 ]]; then
- [ "$curl" -eq 1 ] && happy_print "curl" "is present, whew."
+ [ "$curl" -eq 1 ] && happy_print "curl" "is present, phew."
fi
[ "$git" -eq 1 ] && happy_print "git" "is installed, nice one."
-[ "$node" -eq 1 ] && happy_print "nodejs" "is installed."
+[ "$node" -eq 1 ] && happy_print "NodeJS" "is installed."
[ "$ruby" -eq 1 ] && happy_print "ruby" "is installed."
-[ "$gem" -eq 1 ] && happy_print "rubygems" "is installed."
-[ "$compass" -eq 1 ] && happy_print "compass" "is installed."
-[ "$phantomjs" -eq 1 ] && happy_print "phantomjs" "is installed."
+[ "$gem" -eq 1 ] && happy_print "RubyGems" "is installed."
+[ "$compass" -eq 1 ] && happy_print "Compass" "is installed."
+[ "$phantomjs" -eq 1 ] && happy_print "PhamtomJS" "is installed."
[ "$jpegturbo" -eq 1 ] && happy_print "jpeg-turbo" "is installed."
# failures
if [[ "$mac" = 1 ]]; then
- [ "$cli" -eq 0 ] && sad_print "XCode CLI Tools" "is not installed, please check the installation docs for assistance."
- [ "$brew" -eq 0 ] && sad_print "homebrew" "is not installed, please check the installation docs for assistance."
+ [ "$cli" -eq 0 ] && \
+ sad_print "Command Line Tools for Xcode" "is not installed." && \
+ printf "\tVisit http://stackoverflow.com/a/9329325/89484 for installation options.\n"
+ [ "$brew" -eq 0 ] && \
+ sad_print "Homebrew" "Install Homebrew from the instructions at https://github.com/mxcl/homebrew/wiki/Installation" && \
+ printf "\t%s \e[47m\e[0;35m%s\e[0m %s\n" "For best results, after install, be sure to run" "brew doctor" "and follow the recommendations."
fi
if [[ "$linux" = 1 ]]; then
- [ "$curl" -eq 0 ] && sad_print "curl" "is not installed, please check the installation docs for assistance."
+ [ "$curl" -eq 0 ] && sad_print "curl" "is not installed."
fi
-[ "$git" -eq 0 ] && sad_print "git" "is not installed, please check the installation docs for assistance."
-[ "$node" -eq 0 ] && sad_print "nodejs" "is not installed, please check the installation docs for assistance."
-[ "$ruby" -eq 0 ] && sad_print "ruby" "is not installed, please check the installation docs for assistance."
-[ "$gem" -eq 0 ] && sad_print "rubygems" "is not installed, please check the installation docs for assistance."
-[ "$compass" -eq 0 ] && sad_print "compass" "is not installed, please check the installation docs for assistance."
-[ "$phantomjs" -eq 0 ] && sad_print "phantomjs" "is not installed, please check the installation docs for assistance."
-[ "$jpegturbo" -eq 0 ] && sad_print "jpeg-turbo" "is not installed, please check the installation docs for assistance."
+[ "$git" -eq 0 ] && \
+ sad_print "git" "is not installed. Install through your package manager:" && \
+ printf "\t\e[47m\e[0;35m%s\e[0m %s\n" "brew install git"
+[ "$node" -eq 0 ] && \
+ sad_print "NodeJS" "I recommend you grab a fresh NodeJS install (>= 0.8.x) from http://nodejs.org/download/"
+[ "$ruby" -eq 0 ] && \
+ sad_print "ruby" "required >= 1.8.7." && \
+ printf "\t%s \e[47m\e[0;35m%s\e[0m %s\n" "Check your ruby with " "ruby -v" "and install http://www.ruby-lang.org/en/downloads/"
+[ "$gem" -eq 0 ] && \
+ sad_print "RubyGems" "You'll pick this up with your ruby installation."
+[ "$compass" -eq 0 ] && \
+ sad_print "Compass" "is not installed: http://compass-style.org/install/"
+[ "$phantomjs" -eq 0 ] && \
+ sad_print "PhamtomJS" "is not installed." && \
+ printf "\tFollow instructions at http://phantomjs.org/download.html - the binary installs are quick!\n"
+[ "$jpegturbo" -eq 0 ] && \
+ sad_print "jpeg-turbo" "not present" && \
+ printf "\t\e[47m\e[0;35m%s\e[0m %s" "brew install jpeg-turbo && brew link jpeg-turbo" "should do the trick."
echo ""
-echo "Please ensure all of the above tests have passed before trying to install yeoman."
+echo ""
+echo "Please ensure all of the above tests have passed before running yeoman."

0 comments on commit 6c6e76d

Please sign in to comment.