From 933cf1fab1c4f9860aaa7714be27ab71e72fc156 Mon Sep 17 00:00:00 2001 From: janWilejan <119548498+janWilejan@users.noreply.github.com> Date: Fri, 22 Sep 2023 02:07:40 +0000 Subject: [PATCH] Add offline option to bundle web.sh (#3202) * add offline option to bundleWeb.sh * fix offline flag for bundleWeb.sh --------- Co-authored-by: janWilejan <> --- build/web/bundleWeb.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build/web/bundleWeb.sh b/build/web/bundleWeb.sh index d1e07d97a..5f1089c83 100755 --- a/build/web/bundleWeb.sh +++ b/build/web/bundleWeb.sh @@ -5,13 +5,26 @@ set -o errexit set -o nounset set -o pipefail +OFFLINE= +while [[ $# -gt 0 ]]; do + case $1 in + --offline) + OFFLINE=1 + ;; + esac + shift +done + # Change to the root directory of the repository cd "$(git rev-parse --show-toplevel)" cd web -echo "Installing npm modules for the owncast web..." -npm --silent install 2>/dev/null +if [ ! "$OFFLINE" ] +then + echo "Installing npm modules for the owncast web..." + npm --silent install 2>/dev/null +fi echo "Building owncast web..." rm -rf .next