OSDN Git Service

[fix] : Fixxed re-run
authorhayao <hayao@fascode.net>
Thu, 1 Jul 2021 14:42:38 +0000 (23:42 +0900)
committerhayao <hayao@fascode.net>
Thu, 1 Jul 2021 14:42:38 +0000 (23:42 +0900)
build.sh

index aac1409..8b15846 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -1031,12 +1031,16 @@ make_iso() {
 
 
 # Parse options
+ARGUMENT=("${DEFAULT_ARGUMENT[@]}" "${@}")
 OPTS=("a:" "b" "c:" "d" "e" "g:" "h" "j" "k:" "l:" "o:" "p:" "r" "t:" "u:" "w:" "x")
 OPTL=("arch:" "boot-splash" "comp-type:" "debug" "cleaning" "cleanup" "gpgkey:" "help" "lang:" "japanese" "kernel:" "out:" "password:" "comp-opts:" "user:" "work:" "bash-debug" "nocolor" "noconfirm" "nodepend" "gitversion" "msgdebug" "noloopmod" "tarball" "noiso" "noaur" "nochkver" "channellist" "config:" "noefi" "nodebug" "nosigcheck" "normwork" "log" "logpath:" "nolog" "nopkgbuild" "pacman-debug" "confirm")
-if ! OPT=$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" --  "${@}" "${DEFAULT_ARGUMENT[@]}"); then
+if ! OPT=$(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" --  "${ARGUMENT[@]}"); then
+#if ! readarray OPT < <(getopt -o "$(printf "%s," "${OPTS[@]}")" -l "$(printf "%s," "${OPTL[@]}")" --  "${ARGUMENT[@]}"); then
     exit 1
 fi
 
+#eval set -- "${OPT[@]}"4
+#msg_debug "Argument: ${OPT[@]}"
 eval set -- "${OPT}"
 msg_debug "Argument: ${OPT}"
 unset OPT OPTS OPTL DEFAULT_ARGUMENT