From f43ece0a9950260a2520590ab46d4ed9960e2dc6 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 14 Oct 2021 11:48:01 -0700 Subject: [PATCH] devops: fix `//browser_patches/{build.sh,clean.sh}` scripts (#9515) They were not proxying arguments properly. --- browser_patches/build.sh | 16 +++++++++------- browser_patches/clean.sh | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/browser_patches/build.sh b/browser_patches/build.sh index 207e084603..509307f9e0 100755 --- a/browser_patches/build.sh +++ b/browser_patches/build.sh @@ -18,20 +18,22 @@ if [[ $# == 0 ]]; then exit 1 fi -if [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then +CMD="$1" +shift +if [[ ("$CMD" == "firefox") || ("$CMD" == "firefox/") || ("$CMD" == "ff") ]]; then bash ./firefox/build.sh "$@" -elif [[ ("$1" == "firefox-beta") || ("$1" == "ff-beta") ]]; then +elif [[ ("$CMD" == "firefox-beta") || ("$CMD" == "ff-beta") ]]; then bash ./firefox-beta/build.sh "$@" -elif [[ ("$1" == "webkit") || ("$1" == "webkit/") || ("$1" == "wk") ]]; then +elif [[ ("$CMD" == "webkit") || ("$CMD" == "webkit/") || ("$CMD" == "wk") ]]; then bash ./webkit/build.sh "$@" -elif [[ ("$1" == "chromium") || ("$1" == "chromium/") || ("$1" == "cr") ]]; then +elif [[ ("$CMD" == "chromium") || ("$CMD" == "chromium/") || ("$CMD" == "cr") ]]; then bash ./chromium/build.sh "$@" -elif [[ ("$1" == "winldd") ]]; then +elif [[ ("$CMD" == "winldd") ]]; then bash ./winldd/build.sh "$@" -elif [[ ("$1" == "ffmpeg") ]]; then +elif [[ ("$CMD" == "ffmpeg") ]]; then bash ./ffmpeg/build.sh "$@" else - echo ERROR: unknown browser to build - "$1" + echo ERROR: unknown browser to build - "$CMD" exit 1 fi diff --git a/browser_patches/clean.sh b/browser_patches/clean.sh index 4cba35f945..b6a2cfe1da 100755 --- a/browser_patches/clean.sh +++ b/browser_patches/clean.sh @@ -18,20 +18,22 @@ if [[ $# == 0 ]]; then exit 1 fi -if [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then +CMD="$1" +shift +if [[ ("$CMD" == "firefox") || ("$CMD" == "firefox/") || ("$CMD" == "ff") ]]; then bash ./firefox/clean.sh "$@" -elif [[ ("$1" == "firefox-beta") || ("$1" == "ff-beta") ]]; then +elif [[ ("$CMD" == "firefox-beta") || ("$CMD" == "ff-beta") ]]; then bash ./firefox-beta/clean.sh "$@" -elif [[ ("$1" == "webkit") || ("$1" == "webkit/") || ("$1" == "wk") ]]; then +elif [[ ("$CMD" == "webkit") || ("$CMD" == "webkit/") || ("$CMD" == "wk") ]]; then bash ./webkit/clean.sh "$@" -elif [[ ("$1" == "chromium") || ("$1" == "chromium/") || ("$1" == "cr") ]]; then +elif [[ ("$CMD" == "chromium") || ("$CMD" == "chromium/") || ("$CMD" == "cr") ]]; then bash ./chromium/clean.sh "$@" -elif [[ ("$1" == "winldd") ]]; then +elif [[ ("$CMD" == "winldd") ]]; then bash ./winldd/clean.sh "$@" -elif [[ ("$1" == "ffmpeg") ]]; then +elif [[ ("$CMD" == "ffmpeg") ]]; then bash ./ffmpeg/clean.sh "$@" else - echo ERROR: unknown browser to build - "$1" + echo ERROR: unknown browser to build - "$CMD" exit 1 fi