From 966547ef232c7c079db654dcd2986683389ca18d Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Sat, 7 Nov 2020 18:37:08 +0530 Subject: [PATCH] gupload: Always exit after --update or --uninstall flag is used --- bash/release/gupload | 8 ++++++-- bash/upload.bash | 8 ++++++-- sh/release/gupload | 8 ++++++-- sh/upload.sh | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/bash/release/gupload b/bash/release/gupload index cf17fc5..0077b26 100755 --- a/bash/release/gupload +++ b/bash/release/gupload @@ -1164,8 +1164,12 @@ _setup_arguments() { if [[ ${1} = -* ]]; then [[ ${GUPLOAD_INSTALLED_WITH} = script ]] && { case "${1}" in - -u | --update) _check_debug && _update && exit "${?}" ;; - --uninstall) _check_debug && _update uninstall && exit "${?}" ;; + -u | --update) + _check_debug && _update && { exit 0 || exit 1; } + ;; + --uninstall) + _check_debug && _update uninstall && { exit 0 || exit 1; } + ;; esac } printf '%s: %s: Unknown option\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" && exit 1 diff --git a/bash/upload.bash b/bash/upload.bash index bc6d589..1ea3168 100755 --- a/bash/upload.bash +++ b/bash/upload.bash @@ -231,8 +231,12 @@ _setup_arguments() { if [[ ${1} = -* ]]; then [[ ${GUPLOAD_INSTALLED_WITH} = script ]] && { case "${1}" in - -u | --update) _check_debug && _update && exit "${?}" ;; - --uninstall) _check_debug && _update uninstall && exit "${?}" ;; + -u | --update) + _check_debug && _update && { exit 0 || exit 1; } + ;; + --uninstall) + _check_debug && _update uninstall && { exit 0 || exit 1; } + ;; esac } printf '%s: %s: Unknown option\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" && exit 1 diff --git a/sh/release/gupload b/sh/release/gupload index 27d432b..844bce6 100755 --- a/sh/release/gupload +++ b/sh/release/gupload @@ -1157,8 +1157,12 @@ _setup_arguments() { if [ -z "${1##-*}" ]; then [ "${GUPLOAD_INSTALLED_WITH}" = script ] && { case "${1}" in - -u | --update) _check_debug && _update && exit "${?}" ;; - --uninstall) _check_debug && _update uninstall && exit "${?}" ;; + -u | --update) + _check_debug && _update && { exit 0 || exit 1; } + ;; + --uninstall) + _check_debug && _update uninstall && { exit 0 || exit 1; } + ;; esac } printf '%s: %s: Unknown option\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" && exit 1 diff --git a/sh/upload.sh b/sh/upload.sh index 61d598d..6e62018 100755 --- a/sh/upload.sh +++ b/sh/upload.sh @@ -239,8 +239,12 @@ _setup_arguments() { if [ -z "${1##-*}" ]; then [ "${GUPLOAD_INSTALLED_WITH}" = script ] && { case "${1}" in - -u | --update) _check_debug && _update && exit "${?}" ;; - --uninstall) _check_debug && _update uninstall && exit "${?}" ;; + -u | --update) + _check_debug && _update && { exit 0 || exit 1; } + ;; + --uninstall) + _check_debug && _update uninstall && { exit 0 || exit 1; } + ;; esac } printf '%s: %s: Unknown option\nTry '"%s -h/--help"' for more information.\n' "${0##*/}" "${1}" "${0##*/}" && exit 1