From e2fe4ee27655d4858ec6f2a069a0f108f0c5d743 Mon Sep 17 00:00:00 2001 From: Alexander David Frick Date: Sat, 4 Jun 2022 22:35:59 -0700 Subject: [PATCH] Update build.sh --- build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 4a0cca41..0cacfaae 100644 --- a/build.sh +++ b/build.sh @@ -3,10 +3,17 @@ # Copyright (c) 2022 Alex313031. YEL='\033[1;33m' # Yellow +GRE='\033[1;32m' # Green c0=$'\033[0m' # Reset Text bold=$'\033[1m' # Bold Text underline=$'\033[4m' # Underline Text +# Error handling +yell() { echo "$0: $*" >&2; } +die() { yell "$*"; exit 111; } +try() { "$@" || die "Failed $*"; } + +# --help displayHelp () { printf "\n" && printf "${bold}${YEL}Script to build Thorium on Linux.${c0}\n" && @@ -20,9 +27,11 @@ esac printf "\n" && printf "${YEL}Building Thorium for Linux...\n" && -printf "\n" && -tput sgr0 && +printf "${GRE}\n" && +# Build Thorium export NINJA_SUMMARIZE_BUILD=1 && ./infra/autoninja -C ~/chromium/src/out/thorium chrome chrome_sandbox chromedriver thorium_shell -j$@ + +tput sgr0