OSDN Git Service

[fix] : Fixed syntax
authorhayao <hayao@fascode.net>
Tue, 19 Jan 2021 10:57:05 +0000 (19:57 +0900)
committerhayao <hayao@fascode.net>
Tue, 19 Jan 2021 10:57:05 +0000 (19:57 +0900)
alterlinux-desktop-file/alterlinux-desktop-file

index bedbc6a..0258ecf 100755 (executable)
@@ -41,20 +41,20 @@ _help() {
 
 # Argument analysis and processing
 options="${@}"
-_opt_short="fhl"
-_opt_long="force,live,help,alterlive"
-OPT=$(getopt -o ${_opt_short} -l ${_opt_long} -- "${@}")
-if [[ ${?} != 0 ]]; then
+opt_short="fhl"
+opt_long="force,live,help,alterlive"
+OPT="$(getopt -o ${opt_short} -l ${opt_long} -- "${@}")"
+if (( "${?}" != 0 )); then
     exit 1
 fi
 
 eval set -- "${OPT}"
 unset OPT
-unset _opt_short
-unset _opt_long
+unset opt_short
+unset opt_long
 
 while true; do
-    case ${1} in
+    case "${1}" in
         -f | --force)
             force=true
             shift 1