From 630e5eefbc47df3001bdb08be0162d5d537b0170 Mon Sep 17 00:00:00 2001 From: Mason Payne Date: Sun, 10 Nov 2024 14:36:50 -0700 Subject: [PATCH] fix web setup script --- setup_ente_web.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/setup_ente_web.sh b/setup_ente_web.sh index c1eb104..ce4d357 100755 --- a/setup_ente_web.sh +++ b/setup_ente_web.sh @@ -10,10 +10,29 @@ LOCAL_REPO="/home/mason/src/ente" cd $LOCAL_REPO/web -yarn install -yarn build:photos # puts the built files in the web/apps/photos/out directory +# make sure that all the previous build steps have been completed +# the following steps are required to build the photos app -sudo cp -r apps/photos/out /var/www/ente/photos +#git submodule update --init --recursive +#yarn install +#yarn build:photos # puts the built files in the web/apps/photos/out directory + +# make sure the photos app is built +if [ ! -d "$LOCAL_REPO/apps/photos/out" ]; then + echo "The photos app has not been built. Please build the app and rerun the script." + + # print the steps to build the photos app + echo "To build the photos app, run the following commands:" + echo "cd $LOCAL_REPO/web" + echo "git submodule update --init --recursive" + echo "yarn install" + echo "yarn build:photos" + + + exit 1 +fi + +sudo cp -r $LOCAL_REPO/apps/photos/out /var/www/ente/photos # configure nginx to serve the photos app on ente.sa.vin sudo tee /etc/nginx/sites-available/ente.sa.vin.conf > /dev/null <