1
0

More consistent scripts
Some checks failed
Build and test project / build-and-test (push) Failing after 1m13s

This commit is contained in:
2026-03-21 19:05:40 +01:00
parent 7a7814a051
commit 518f7b63e7
4 changed files with 7 additions and 15 deletions

View File

@@ -27,6 +27,6 @@ echo "WASM binary size: $(du -h kobopatch.wasm | cut -f1)"
echo "Copying artifacts..."
mkdir -p "$DIST_DIR/wasm"
cp kobopatch.wasm "$DIST_DIR/wasm/kobopatch.wasm"
cp wasm_exec.js "$SRC_DIR/js/wasm_exec.js"
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" "$SRC_DIR/js/wasm_exec.js"
echo "Done."

View File

@@ -44,20 +44,7 @@ else
git checkout 6189c54 # update this as updates come out
fi
echo "Copying wasm_exec.js from Go SDK..."
GOROOT="$(go env GOROOT)"
if [ -f "$GOROOT/lib/wasm/wasm_exec.js" ]; then
cp "$GOROOT/lib/wasm/wasm_exec.js" "$SCRIPT_DIR/wasm_exec.js"
elif [ -f "$GOROOT/misc/wasm/wasm_exec.js" ]; then
cp "$GOROOT/misc/wasm/wasm_exec.js" "$SCRIPT_DIR/wasm_exec.js"
else
echo "Error: could not find wasm_exec.js in Go SDK"
echo "GOROOT=$GOROOT"
exit 1
fi
echo ""
echo "Done. kobopatch source is at: $KOBOPATCH_DIR"
echo "wasm_exec.js copied to: $SCRIPT_DIR/wasm_exec.js"
echo ""
echo "Run ./build.sh to compile the WASM binary."

View File

@@ -17,7 +17,7 @@ if [ -z "$DOWNLOAD_URL" ] || [ "$DOWNLOAD_URL" = "null" ]; then
fi
echo "Downloading KF_Readerly.zip..."
curl -fSL -o "$PUBLIC_DIR/KF_Readerly.zip" "$DOWNLOAD_URL"
curl -fL --progress-bar -o "$PUBLIC_DIR/KF_Readerly.zip" "$DOWNLOAD_URL"
echo " -> $(du -h "$PUBLIC_DIR/KF_Readerly.zip" | cut -f1)"
echo ""

View File

@@ -21,6 +21,11 @@ if [ ! -f "$FIRMWARE_FILE" ]; then
fi
fi
# Set up kobopatch WASM build dependencies if not present.
if [ ! -d "$SCRIPT_DIR/kobopatch-wasm/kobopatch-src" ]; then
"$SCRIPT_DIR/kobopatch-wasm/setup.sh"
fi
# Set up KOReader assets if not present (served by the app, not a test-only asset).
if [ ! -f "$SCRIPT_DIR/web/src/koreader/koreader-kobo.zip" ]; then
"$SCRIPT_DIR/koreader/setup.sh"