From: <sg...@us...> - 2003-08-31 21:36:03
|
Update of /cvsroot/libfunutil/libfunutil/toc/sbin In directory sc8-pr-cvs1:/tmp/cvs-serv320/toc/sbin Modified Files: toc_core.sh Log Message: Some quoting/scoping-related quasi-fixes. --verbose now works differently, enabling --loud and disabling --quiet. Added toc_tests_help to the core tests, to allow it to be called very early, but this is extremely arguable. Index: toc_core.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/sbin/toc_core.sh,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- toc_core.sh 31 Aug 2003 20:32:56 -0000 1.24 +++ toc_core.sh 31 Aug 2003 21:36:00 -0000 1.25 @@ -165,8 +165,8 @@ i=$((i - 1)) while test $i -ge 0; do foo=${CONFIG_DOT_MAKE_ARRAY[$i]} - k="${foo%%=*}" - v="${foo#*=}" + local k="${foo%%=*}" + local v="${foo#*=}" test "$arg" = "$k" && { ret=0 theval="$v" @@ -665,7 +665,7 @@ while [ "$#" -gt 0 ]; do VAR= VAL= - arg=$1 + arg="$1" shift case $arg in --help|-?) @@ -690,8 +690,10 @@ --XXX=YYY | Exports config variable XXX=YYY. --XXX | Equivalent to --XXX=1. --toc-quiet,--quiet | Disables some text which may be of arguable utility. - --toc-loud, --verbose, --loud | Enables some otherwise superfluous information. + --toc-loud, --loud | Enables some otherwise superfluous information. + --verbose | Enables --loud and disables --quiet --toc-fail-fast | Causes configure to abort if toc_run_failok returns non-zero. + EOF # ^^^^ note usage of hard tabs in the cat command! exit 0 @@ -701,10 +703,15 @@ VAR=$(echo $arg | sed "s,^--\(.*\)=.*,\1,;") VAL=$(echo $arg | sed "s,^--.*=\(.*\),\1,") ;; - --loud|--verbose|--toc-loud) + --loud|--toc-loud) VAR=TOC_LOUD VAL=1 ;; + --verbose) + TOC_QUIET=0 + TOC_LOUD=1 + export TOC_QUIET TOC_LOUD + ;; --quiet) VAR=TOC_QUIET VAL=1 @@ -776,6 +783,8 @@ echo "Configuring build environment." toc_parseargs --prefix=${prefix} "$@" toc_loudly 'Loud mode enabled.' + +toc_run_fail toc_tests_help toc_quietly <<-EOF ${TOC_BOLD_}Emoticon legend:${_TOC_BOLD} |