Browse Source

Initialize all switches as off in parse_input()

bryan 3 months ago
parent
commit
63f40b4ca1
1 changed files with 3 additions and 6 deletions
  1. 3 6
      installJRMC

+ 3 - 6
installJRMC

@@ -114,9 +114,9 @@ print_help() {
 # @arg $@ User input
 parse_input() {
   debug "Running: ${FUNCNAME[0]} $*"
-  declare -gi BUILD_SWITCH REPO_INSTALL_SWITCH LOCAL_INSTALL_SWITCH \
-    CONTAINER_INSTALL_SWITCH COMPAT_SWITCH CREATEREPO_SWITCH UNINSTALL_SWITCH \
-    YES_SWITCH DEBUG
+  declare -gi BUILD_SWITCH=0 REPO_INSTALL_SWITCH=0 LOCAL_INSTALL_SWITCH=0 \
+    CONTAINER_INSTALL_SWITCH=0 COMPAT_SWITCH=0 CREATEREPO_SWITCH=0 UNINSTALL_SWITCH=0 \
+    YES_SWITCH=0 DEBUG=0
   declare -g USER_MC_VERSION USER_MC_REPO MJR_FILE \
     BETAPASS SERVICE_TYPE VNCPASS USER_DISPLAY BUILD_TARGET CREATEREPO_TARGET
   local long_opts short_opts input
@@ -128,9 +128,6 @@ parse_input() {
   long_opts+="vncpass:,display:,container:"
   short_opts="+i:b::s:c:uyvdh"
 
-  # Reset DEBUG and recatch properly with getopt
-  DEBUG=0
-
   if input=$(getopt -o $short_opts -l $long_opts -- "$@"); then
     eval set -- "$input"
     while true; do