1
0
Files
kobopatch-webui/run-locally.sh
Nico Verbruggen 6d4bce8e05
All checks were successful
Build and test project / build-and-test (push) Successful in 1m47s
Don't load custom fonts, fix scripts
2026-03-17 13:59:57 +01:00

17 lines
441 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/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