Skip to content

Commit

Permalink
Fixed OS detection and added color printing.
Browse files Browse the repository at this point in the history
Example usage : sad_print "CURL not installed" "Follow this url to install"
  • Loading branch information
hemanth authored and paulirish committed Sep 14, 2012
1 parent bb08480 commit ae82e63
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions setup/audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand All @@ -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......
Expand Down

0 comments on commit ae82e63

Please sign in to comment.