Fix default for simple args
This commit is contained in:
@@ -240,15 +240,14 @@ init() {
|
|||||||
USER="${SUDO_USER:-$USER}"
|
USER="${SUDO_USER:-$USER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set default command arguments and/or parse user input
|
# Parse input commands with getopt
|
||||||
if [[ $# -eq 0 || ! "$*" =~ (--install|--service|--container|--createrepo) ]]; then
|
if [[ $# -eq 0 || ! "$*" =~ (--install|--service|--container|--createrepo) ]]; then
|
||||||
debug "Automatically using --install=repo"
|
debug "Automatically using --install=repo"
|
||||||
REPO_INSTALL_SWITCH=1
|
declare -gi REPO_INSTALL_SWITCH=1
|
||||||
|
else
|
||||||
|
parse_input "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Parse input commands with getopt
|
|
||||||
[[ $# -gt 0 ]] && parse_input "$@"
|
|
||||||
|
|
||||||
# Run the self-updater if enabled
|
# Run the self-updater if enabled
|
||||||
((UPDATE_SWITCH)) && update "$@"
|
((UPDATE_SWITCH)) && update "$@"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user