#! /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 pushd frontend npm install npm update npm run build npm run format npm run dev popd popd