-
-
Save sohooo/772066031d9d7ad9f6824e1af109c232 to your computer and use it in GitHub Desktop.
Revisions
-
nshah created this gist
Jul 20, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ # EasyColors if [ ${libout_color:-1} -eq 1 ]; then DEF_COLOR="\x1b[0m" BLUE="\x1b[34;01m" CYAN="\x1b[36;01m" GREEN="\x1b[32;01m" RED="\x1b[31;01m" GRAY="\x1b[37;01m" YELLOW="\x1b[33;01m" fi debug() { if [ ${verbose_level:-0} -gt 3 ]; then echo "$CYAN >>$DEF_COLOR $@" fi } info() { if [ ${verbose_level:-0} -gt 2 ]; then echo "$GREEN >>$DEF_COLOR $@" fi } warn() { if [ ${verbose_level:-0} -gt 1 ]; then echo "$YELLOW >>$DEF_COLOR $@" fi } message() { if [ ${verbose_level:-0} -gt 0 ]; then echo "$GREEN >>$DEF_COLOR $@" fi } error() { echo "$RED >>$DEF_COLOR $@" } die() { error "$@" exit 1 }