diff options
author | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-07-19 15:11:57 +0000 |
---|---|---|
committer | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-07-19 15:11:57 +0000 |
commit | 22fad27c413ff4413d4a5273f228e2e00c8568ea (patch) | |
tree | 7d16e1b3cd729c2577a02470c09ec025bf0cea34 /branches/0.6/lib | |
parent | bc402596d91bf4a743f9892840e10f360652ba8a (diff) | |
download | simplepkg-22fad27c413ff4413d4a5273f228e2e00c8568ea.tar.gz simplepkg-22fad27c413ff4413d4a5273f228e2e00c8568ea.tar.bz2 |
createpkg-1.1.1; mkbuild-1.0.0 e common.sh update. Descrição das alterações na lista do grupo.
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@402 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'branches/0.6/lib')
-rw-r--r-- | branches/0.6/lib/common.sh | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/branches/0.6/lib/common.sh b/branches/0.6/lib/common.sh index 4e18dfa..67ab161 100644 --- a/branches/0.6/lib/common.sh +++ b/branches/0.6/lib/common.sh @@ -175,6 +175,18 @@ function eval_parameter { } +function set_constants { + + # Set common constants + # on/off + on=1 + off=0 + # yes/no + yes=1 + no=0 + +} + function eval_boolean_parameter { # get a boolean parameter from the configuration @@ -184,11 +196,17 @@ function eval_boolean_parameter { # get the value value="`eval_parameter $1 $2`" + convert_boolean $value + +} + +function convert_boolean { + # force case insensitiveness - value="`echo $value | tr '[:upper:]' '[:lower:]'`" + local value="`echo $1 | tr '[:upper:]' '[:lower:]'`" # convert it to wheter 0 or 1 - if [ "$value" == "yes" ] || [ "$value" == "1" ]; then + if [ "$value" == "yes" ] || [ "$value" == "1" ] || [ "$value" == "on" ]; then echo 1 else echo 0 @@ -257,19 +275,6 @@ function eval_config { # now we place "patches" on the top of ROOT_PRIORITY ROOT_PRIORITY="patches `echo $ROOT_PRIORITY | sed -e 's/patches//'`" - # ---------------------------------------------------------------- - # createpkg and mkbuild section - #MAKEPKG_REPOS="`eval_parameter MAKEPKG_REPOS /var/simplaret/repos`" - #SOURCE_DIR="`eval_parameter SOURCE_DIR /var/simplaret/sources`" - #SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/simplaret/slackbuilds`" - - #COLOR_MODE="`eval_parameter COLOR_MODE none`" - #CREATE_ARCH="`eval_parameter CREATE_ARCH i486`" - #CREATE_CLEANUP="`eval_parameter CREATE_CLEANUP 'yes'`" - - #REMOVE_OLD_PACKAGE="`eval_parameter REMOVE_OLD_PACKAGE off`" - #MOVE_BIN_PACKAGE="`eval_parameter MOVE_BIN_PACKAGE off`" - # ---------------------------------------------------------------- else echo $1 error: config file $CONFIG not found |