mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
cleanup
This commit is contained in:
parent
e4cef81a8a
commit
43bcdfc8a2
30
inxi
30
inxi
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue