1
0
Files
kobopatch-webui/serve-locally.sh
Nico Verbruggen dbd2f391bd
All checks were successful
Build and test project / build-and-test (push) Successful in 1m46s
Add more integration tests
2026-03-17 18:38:54 +01:00

22 lines
607 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
WASM_DIR="$SCRIPT_DIR/kobopatch-wasm"
if [ ! -f "$SCRIPT_DIR/web/public/nickelmenu/NickelMenu.zip" ]; then
echo "NickelMenu assets not found, downloading..."
"$SCRIPT_DIR/nickelmenu/setup.sh"
fi
if [ ! -f "$SCRIPT_DIR/web/public/wasm/kobopatch.wasm" ]; then
echo "WASM binary not found, building..."
if [ ! -d "$WASM_DIR/kobopatch-src" ]; then
"$WASM_DIR/setup.sh"
fi
"$WASM_DIR/build.sh"
fi
echo "Serving at http://localhost:8888"
python3 -m http.server -d "$SCRIPT_DIR/web/public/" 8888