diff --git a/bin/installOnWindows.bat b/bin/installOnWindows.bat index 5b04919bd..97cddce24 100644 --- a/bin/installOnWindows.bat +++ b/bin/installOnWindows.bat @@ -19,6 +19,15 @@ IF EXIST admin ( cd /D .. ) +:: Install ui only if available +IF EXIST ui ( + cd /D .\ui + dir + cmd /C pnpm i || exit /B 1 + cmd /C pnpm run build || exit /B 1 + cd /D .. +) + cmd /C pnpm i || exit /B 1 diff --git a/bin/run.sh b/bin/run.sh index 654897fa4..c6c4c92c9 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -22,7 +22,7 @@ Please type 'Etherpad rocks my socks' (or restart with the '--root' argument) if you still want to start it as root: EOF printf "> " >&2 - read rocks + read -r rocks [ "$rocks" = "Etherpad rocks my socks" ] || fatal "Your input was incorrect" fi @@ -32,9 +32,11 @@ bin/installDeps.sh "$@" || exit 1 ## Create the admin ui if [ -z "$NODE_ENV" ] || [ "$NODE_ENV" = "development" ]; then - ADMIN_UI_PATH="$(dirname $0)/../admin" + ADMIN_UI_PATH="$(dirname "$0")/../admin" + UI_PATH="$(dirname "$0")/../ui" log "Creating the admin UI..." - (cd $ADMIN_UI_PATH && pnpm run build) + (cd "$ADMIN_UI_PATH" && pnpm run build) + (cd "$UI_PATH" && pnpm run build) else log "Cannot create the admin UI in production mode" fi