Permalink
Browse files

Fixed OS detection and added color printing.

Example usage : sad_print "CURL not installed" "Follow this url to install"
  • Loading branch information...
1 parent bb08480 commit ae82e63ddef60cf5105f5e27b170435bd0c28d14 @hemanth hemanth committed with paulirish Sep 14, 2012
Showing with 14 additions and 2 deletions.
  1. +14 −2 setup/audit.sh
View
@@ -18,9 +18,9 @@ reqcompass=0.12.1
# check os
os=$(uname -s)
-if [[ "$os" == "darwin" ]]; then
+if [[ "$os" == "Darwin" ]]; then
mac=1
-elif [[ "$os" == "linux" ]]; then
+elif [[ "$os" == "Linux" ]]; then
linux=1
else
echo "os not supproted!"
@@ -43,6 +43,18 @@ clangfile=$(command -v clang)
check_set(){
[ -z "$1" ] && echo 1 || echo 0
}
+
+# This prints the ✘ in red,
+# rest in bold.
+sad_print(){
+ printf '\e[31m%s\e[0m \e[1m%s\e[0m %s\n' "" "$1" "$2"
+}
+
+# This prints ✓ in green,
+# rest in bold.
+happy_print(){
+ printf '\e[32m%s\e[0m \e[1m%s\e[0m %s\n' "" "$1" "$2"
+}
# audit \o/
echo "wotcha! well, hello! below is a quick audit i have run to see if everything is in place for yeoman......

0 comments on commit ae82e63

Please sign in to comment.