This commit is contained in:
inxi-svn 2008-11-01 22:05:22 +00:00
parent e4cef81a8a
commit 43bcdfc8a2

30
inxi
View file

@ -429,8 +429,7 @@ get_parameters()
while getopts c:CdDhTUv:V opt while getopts c:CdDhTUv:V opt
do do
case $opt in case $opt in
c) c) if [ -n "$( egrep '^[0-9][0-9]?$' <<< $OPTARG )" ];then
if [ -n "$( egrep '^[0-9][0-9]?$' <<< $OPTARG )" ];then
COLOR_SCHEME_SET='true' COLOR_SCHEME_SET='true'
## note: not sure about this, you'd think user values should be overridden, but ## note: not sure about this, you'd think user values should be overridden, but
## we'll leave this for now ## we'll leave this for now
@ -441,39 +440,30 @@ get_parameters()
error_handler 3 "$OPTARG" error_handler 3 "$OPTARG"
fi fi
;; ;;
C) C) B_HANDLE_CORRUPT_DATA='true'
B_HANDLE_CORRUPT_DATA='true'
;; ;;
d) d) VERBOSITY_LEVEL=1
VERBOSITY_LEVEL=1
;; ;;
D) D) DEBUG=1
DEBUG=1
exec 2>&1 exec 2>&1
;; ;;
T) T) B_TESTING_FLAG='true'
B_TESTING_FLAG='true'
;; ;;
v) v) if [[ -n $( egrep "^[0-$VERBOSITY_LEVELS]$" <<< $OPTARG ) ]];then
if [[ -n $( egrep "^[0-$VERBOSITY_LEVELS]$" <<< $OPTARG ) ]];then
VERBOSITY_LEVEL="$OPTARG" VERBOSITY_LEVEL="$OPTARG"
else else
error_handler 4 "$OPTARG" error_handler 4 "$OPTARG"
fi fi
;; ;;
U) U) script_self_updater
script_self_updater
;; ;;
V) V) print_version_info
print_version_info
exit 0 exit 0
;; ;;
h) h) show_options
show_options
exit 0 exit 0
;; ;;
*) *) show_options
show_options
error_handler 7 "$opt" error_handler 7 "$opt"
;; ;;
esac esac