summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-07-12 18:43:11 +0200
committerdd <dd@wx.tnyzeq.icu>2024-07-12 18:43:11 +0200
commitb0cef590024ea5820e7297f338f0d5cc275fa185 (patch)
tree602b7bbcdb9245e7ee0b5a9ee7ebe5b6a6fc44e7
parent06764ffd8e316378d95f7feb37ba1aa4fc3acdce (diff)
downloadvyos-jenkins-b0cef590024ea5820e7297f338f0d5cc275fa185.tar.gz
vyos-jenkins-b0cef590024ea5820e7297f338f0d5cc275fa185.zip
fixed automated scripts --force flag
-rw-r--r--auto/helper-logic24
1 files changed, 12 insertions, 12 deletions
diff --git a/auto/helper-logic b/auto/helper-logic
index 3c655b9..1151b27 100644
--- a/auto/helper-logic
+++ b/auto/helper-logic
@@ -35,9 +35,20 @@ fi
USERNAME_FILE="$SETTINGS_DIR/installer_username"
TOKEN_FILE="$SETTINGS_DIR/installer_token"
+function IsFlagSet {
+ flag="$1"
+ shift
+ for arg; do
+ if [[ $arg == "$flag" ]]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
# Skip the stage check
STAGE_CHECK_DISABLED=false
-if [ "$1" == "--force" ]; then
+if IsFlagSet "--force" "$@"; then
STAGE_CHECK_DISABLED=true
fi
@@ -134,17 +145,6 @@ function PrintJobFailed {
>&2 echo -e "[ ${RED}Failed!${NOCOLOR} ] Package: $1 - Branch: $2"
}
-function IsFlagSet {
- flag="$1"
- shift
- for arg; do
- if [[ $arg == "$flag" ]]; then
- return 0
- fi
- done
- return 1
-}
-
function Run {
command="$1"
infoMessage="$2"