From 9da26f9534adcbd855e37b1584a94ca673e7f4bf Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 31 Aug 2021 13:22:58 +0300 Subject: [PATCH] devops: add `//browser_patches/{build.sh,clean.sh}` (#8582) These are just proxy scripts to the browsers, so you can do: ```sh $ ./browser_patches/prepare_checkout.sh ff-beta $ ./browser_patches/clean.sh ff-beta $ ./browser_patches/build.sh ff-beta $ ./browser_patches/export.sh ff-beta ``` --- browser_patches/build.sh | 37 +++++++++++++++++++++++++++++++++++++ browser_patches/clean.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100755 browser_patches/build.sh create mode 100755 browser_patches/clean.sh diff --git a/browser_patches/build.sh b/browser_patches/build.sh new file mode 100755 index 0000000000..207e084603 --- /dev/null +++ b/browser_patches/build.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -e +set +x + +trap "cd $(pwd -P)" EXIT +cd "$(dirname "$0")" + + +if [[ ($1 == '--help') || ($1 == '-h') ]]; then + echo "usage: build.sh [firefox|webkit|firefox-beta]" + echo + exit 0 +fi + +if [[ $# == 0 ]]; then + echo "missing browser: 'firefox' or 'webkit'" + echo "try './build.sh --help' for more information" + exit 1 +fi + +if [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then + bash ./firefox/build.sh "$@" +elif [[ ("$1" == "firefox-beta") || ("$1" == "ff-beta") ]]; then + bash ./firefox-beta/build.sh "$@" +elif [[ ("$1" == "webkit") || ("$1" == "webkit/") || ("$1" == "wk") ]]; then + bash ./webkit/build.sh "$@" +elif [[ ("$1" == "chromium") || ("$1" == "chromium/") || ("$1" == "cr") ]]; then + bash ./chromium/build.sh "$@" +elif [[ ("$1" == "winldd") ]]; then + bash ./winldd/build.sh "$@" +elif [[ ("$1" == "ffmpeg") ]]; then + bash ./ffmpeg/build.sh "$@" +else + echo ERROR: unknown browser to build - "$1" + exit 1 +fi + diff --git a/browser_patches/clean.sh b/browser_patches/clean.sh new file mode 100755 index 0000000000..4cba35f945 --- /dev/null +++ b/browser_patches/clean.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -e +set +x + +trap "cd $(pwd -P)" EXIT +cd "$(dirname "$0")" + + +if [[ ($1 == '--help') || ($1 == '-h') ]]; then + echo "usage: clean.sh [firefox|webkit|firefox-beta]" + echo + exit 0 +fi + +if [[ $# == 0 ]]; then + echo "missing browser: 'firefox' or 'webkit'" + echo "try './clean.sh --help' for more information" + exit 1 +fi + +if [[ ("$1" == "firefox") || ("$1" == "firefox/") || ("$1" == "ff") ]]; then + bash ./firefox/clean.sh "$@" +elif [[ ("$1" == "firefox-beta") || ("$1" == "ff-beta") ]]; then + bash ./firefox-beta/clean.sh "$@" +elif [[ ("$1" == "webkit") || ("$1" == "webkit/") || ("$1" == "wk") ]]; then + bash ./webkit/clean.sh "$@" +elif [[ ("$1" == "chromium") || ("$1" == "chromium/") || ("$1" == "cr") ]]; then + bash ./chromium/clean.sh "$@" +elif [[ ("$1" == "winldd") ]]; then + bash ./winldd/clean.sh "$@" +elif [[ ("$1" == "ffmpeg") ]]; then + bash ./ffmpeg/clean.sh "$@" +else + echo ERROR: unknown browser to build - "$1" + exit 1 +fi +