From 24f54b03026722fae579e8ab5263674972861065 Mon Sep 17 00:00:00 2001 From: bryan Date: Sat, 22 Feb 2025 15:46:30 -0500 Subject: [PATCH] Fix default for simple args --- installJRMC | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/installJRMC b/installJRMC index 0dda22b..40b14ea 100755 --- a/installJRMC +++ b/installJRMC @@ -240,15 +240,14 @@ init() { USER="${SUDO_USER:-$USER}" fi - # Set default command arguments and/or parse user input + # Parse input commands with getopt if [[ $# -eq 0 || ! "$*" =~ (--install|--service|--container|--createrepo) ]]; then debug "Automatically using --install=repo" - REPO_INSTALL_SWITCH=1 + declare -gi REPO_INSTALL_SWITCH=1 + else + parse_input "$@" fi - - # Parse input commands with getopt - [[ $# -gt 0 ]] && parse_input "$@" - + # Run the self-updater if enabled ((UPDATE_SWITCH)) && update "$@"