diff options
Diffstat (limited to 'branches/0.6/lib')
-rw-r--r-- | branches/0.6/lib/common.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/branches/0.6/lib/common.sh b/branches/0.6/lib/common.sh index d7ec5d7..e4ff2ff 100644 --- a/branches/0.6/lib/common.sh +++ b/branches/0.6/lib/common.sh @@ -261,6 +261,7 @@ function eval_config { # createpkg and mkbuild section SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/slackbuilds`" MAKEPKG_REPOS="`eval_parameter MAKEPKG_REPOS /var/simplaret/binaries`" + SOURCE_DIR="`eval_parameter SOURCE_DIR /var/sources`" REMOVE_OLD_PACKAGE="`eval_boolean_parameter REMOVE_OLD_PACKAGE 1`" MOVE_BIN_PACKAGE="`eval_boolean_parameter MOVE_BIN_PACKAGE 1`" # ---------------------------------------------------------------- @@ -719,3 +720,47 @@ function slash { } +function color_select { + + # Select color mode: gray, color or none (*) + # commun - Communication + # messag - Commum messages + # error - Error messages + # normal - turn off color + case "$1" in + 'gray') + commun="\033[37;1m" + messag="\033[37;1m" + error="\033[30;1m" + alert="\033[37m" + normal="\033[m" + ;; + 'color') + commun="\033[34;1m" # green + messag="\033[32;1m" # blue + error="\033[31;1m" # red + alert="\033[33;1m" # yellow + normal="\033[m" # normal + ;; + *) + commun="" + messag="" + error="" + alert="" + normal="" + ;; + esac + +} + + +function eecho { + + # echoes a message + # usage: eecho <message-type> <message> + # message-type can be: commun, messag, error, normal + + echo -e "${1}${2}${normal}" + +} + |