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