|
|
|
@ -24,6 +24,7 @@ Options:
|
|
|
|
-p, --production Switch to PRODUCTION update channel
|
|
|
|
-p, --production Switch to PRODUCTION update channel
|
|
|
|
-u, --update Force update check
|
|
|
|
-u, --update Force update check
|
|
|
|
-c, --channel Switch to specified update channel
|
|
|
|
-c, --channel Switch to specified update channel
|
|
|
|
|
|
|
|
-s, --cleanup Perform cleanup
|
|
|
|
-h, --help Show this help message
|
|
|
|
-h, --help Show this help message
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -32,7 +33,7 @@ parse_commandline_args() {
|
|
|
|
|
|
|
|
|
|
|
|
load_update_channel
|
|
|
|
load_update_channel
|
|
|
|
|
|
|
|
|
|
|
|
CMDARGS=$(getopt --quiet -o wvldpuc:h --long watchdog,version,loud,develop,production,update,channel:,help -n 'nightscout-tool' -- "$@")
|
|
|
|
CMDARGS=$(getopt --quiet -o wvldpuc:sh --long watchdog,version,loud,develop,production,update,channel:,cleanup,help -n 'nightscout-tool' -- "$@")
|
|
|
|
|
|
|
|
|
|
|
|
# shellcheck disable=SC2181
|
|
|
|
# shellcheck disable=SC2181
|
|
|
|
if [ $? != 0 ]; then
|
|
|
|
if [ $? != 0 ]; then
|
|
|
|
@ -99,6 +100,11 @@ parse_commandline_args() {
|
|
|
|
update_logto
|
|
|
|
update_logto
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
-s | --cleanup)
|
|
|
|
|
|
|
|
NONINTERACTIVE_MODE=true
|
|
|
|
|
|
|
|
do_cleanup_all
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
;;
|
|
|
|
-h | --help)
|
|
|
|
-h | --help)
|
|
|
|
help
|
|
|
|
help
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|
|