diff options
Diffstat (limited to 'scripts/git')
-rwxr-xr-x | scripts/git/git-push-all.sh | 9 | ||||
-rwxr-xr-x | scripts/git/git-setup-dirs.sh | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/scripts/git/git-push-all.sh b/scripts/git/git-push-all.sh index a1ba754c2f..7bbeaecbd0 100755 --- a/scripts/git/git-push-all.sh +++ b/scripts/git/git-push-all.sh @@ -309,15 +309,16 @@ else fi if [ "$MASTER_BRANCH" ] || [ "$MAINT_BRANCHES" ] \ || [ "$RELEASE_BRANCHES" ]; then - printf "Pushing with %ss delays, so CI runs in this order:\n" "$PUSH_DELAY" + printf "Pushing with %ss delays, so CI runs in this order:\\n" \ + "$PUSH_DELAY" if [ "$MASTER_BRANCH" ]; then - printf "%s\n" "$MASTER_BRANCH" + printf "%s\\n" "$MASTER_BRANCH" fi if [ "$MAINT_BRANCHES" ]; then - printf "%s\n" "$MAINT_BRANCHES" + printf "%s\\n" "$MAINT_BRANCHES" fi if [ "$RELEASE_BRANCHES" ]; then - printf "%s\n" "$RELEASE_BRANCHES" + printf "%s\\n" "$RELEASE_BRANCHES" fi fi # shellcheck disable=SC2086 diff --git a/scripts/git/git-setup-dirs.sh b/scripts/git/git-setup-dirs.sh index 495b22b261..384c488995 100755 --- a/scripts/git/git-setup-dirs.sh +++ b/scripts/git/git-setup-dirs.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_NAME=`basename $0` +SCRIPT_NAME=$(basename "$0") function usage() { @@ -295,8 +295,10 @@ function add_remote printf " %s Adding remote %s at %s..." "$MARKER" "$1" "$2" local check_cmd="git remote get-url '$1'" msg=$( eval "$check_cmd" 2>&1 ) + ret=$? # We don't want a remote, so we invert the exit status - if validate_ret_skip $[ ! $? ] "Remote already exists for $1 at $msg."; then + if validate_ret_skip $(( ! ret )) \ + "Remote already exists for $1 at $msg."; then return fi if [ $DRY_RUN -eq 0 ]; then |