From dabd8dc1368df403ff59135bcd6ccf60afd6b16b Mon Sep 17 00:00:00 2001 From: clsty Date: Thu, 30 Oct 2025 12:44:27 +0800 Subject: [PATCH] Update checkdeps --- sdata/subcmd-checkdeps/options.sh | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/sdata/subcmd-checkdeps/options.sh b/sdata/subcmd-checkdeps/options.sh index 909c055e7..562b2e364 100644 --- a/sdata/subcmd-checkdeps/options.sh +++ b/sdata/subcmd-checkdeps/options.sh @@ -17,27 +17,17 @@ para=$(getopt \ -n "$0" -- "$@") [ $? != 0 ] && echo "$0: Error when getopt, please recheck parameters." && exit 1 ##################################################################################### -## getopt Phase 1 -# ignore parameter's order, execute options below first eval set -- "$para" while true ; do case "$1" in -h|--help) showhelp;exit;; - --) break ;; - *) shift ;; + --) shift;break ;; + *) sleep 0 ;; esac done -eval set -- "$para" -while true ; do - case "$1" in - --) break ;; - *) - if [[ -f "$1" ]]; then - echo "Using list file \"$1\".";LIST_FILE_PATH="$1";shift 1 - else - echo "Wrong path of list file.";exit 1 - fi - ;; - esac -done +if [[ -f "$1" ]]; then + echo "Using list file \"$1\".";LIST_FILE_PATH="$1";shift 1 +else + echo "Wrong path \"$1\" of list file.";exit 1 +fi