aboutsummaryrefslogtreecommitdiff
path: root/branches/0.6/lib/common.sh
diff options
context:
space:
mode:
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-06-10 15:24:59 +0000
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-06-10 15:24:59 +0000
commit6ebf28b2bd4aaf32545171565149c5b4e2565985 (patch)
tree9938087fba017d3f26f7a3d186479160c710c64f /branches/0.6/lib/common.sh
parentbbc8df235f99cf03845bdc88058cd76b279f11e1 (diff)
downloadsimplepkg-6ebf28b2bd4aaf32545171565149c5b4e2565985.tar.gz
simplepkg-6ebf28b2bd4aaf32545171565149c5b4e2565985.tar.bz2
mkbuild-0.9.1, createpkg-1.0.5.3 e adição de eecho e color_select a common.sh
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@385 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'branches/0.6/lib/common.sh')
-rw-r--r--branches/0.6/lib/common.sh45
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}"
+
+}
+