From 63f40b4ca167d2e9d3b66aa0f46e1976e685d68d Mon Sep 17 00:00:00 2001 From: bryan Date: Sat, 7 Dec 2024 16:26:49 -0500 Subject: [PATCH] Initialize all switches as off in parse_input() --- installJRMC | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/installJRMC b/installJRMC index 46e3b77..28079e7 100755 --- a/installJRMC +++ b/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