#! /bin/sh DEPLOY_DIR="deploy" REAL_PATH=$(dirname "$(realpath '$1'))") pushd $REAL_PATH if [ -d "$DEPLOY_DIR" ] then echo 'detect the existence of deploy folder, skip running the env.sh' else source env.sh fi export VITE_API_URL='http://127.0.0.1:8002' export VITE_WEBSOCKET_URL='http://127.0.0.1:8002' pushd frontend npm install npm update npm run build npm run format npm run dev popd popd