From 185dd3645268c422e558d5128f890e012a66ccb6 Mon Sep 17 00:00:00 2001 From: Andrea Bondavalli Date: Fri, 28 May 2021 17:27:06 +0200 Subject: [PATCH] build.sh script switches to local WebUI build in case release tarball is not available --- build.sh | 14 +++++++++----- cleanup.sh | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index 2607d73..3873daa 100755 --- a/build.sh +++ b/build.sh @@ -26,13 +26,17 @@ fi cd .. cd webui -# echo "Building and installing webui ..." -# npm install react-modal react-toastify react-router-dom -# npm install -# npm run build echo "Downloading current webui release ..." +if [ -f webui.tar.gz ]; then + rm -f webui.tar.gz +fi wget https://github.com/bondagit/aes67-linux-daemon/releases/latest/download/webui.tar.gz -tar -xzvf webui.tar.gz +if [ ! -f webui.tar.gz ]; then + echo "Building locally and installing webui ..." + npm install react-modal react-toastify react-router-dom + npm install + npm run build +fi cd .. cd daemon diff --git a/cleanup.sh b/cleanup.sh index 0bfc0f2..f7d4280 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -23,6 +23,7 @@ rm -f demo/sink-test.wav rm -rf webui/build rm -rf webui/node_modules +rm -f webui/webui.tar.gz rm -f webui/*.log rm -f webui/package-lock.json