0
0
#!/bin/sh
# Runs the pinned deno of tests/compositions/staging/page-tools.json: PATH's (or $DENO) when it is that version,
# else the one tests/compositions/staging/tools.sh fetches and checks by its sha256.
# site/deno.sh <deno arguments>
set -eu
cd "$(dirname "$0")/.."
pin=$(jq -er .deno.version tests/compositions/staging/page-tools.json)
deno=${DENO:-deno}
if ! "$deno" --version 2>/dev/null | grep -q "^deno $pin "; then
tools=$(SWC_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/socialweb-site" SWC_REPO="$PWD" bash tests/compositions/staging/tools.sh deno)
deno=$tools/deno/deno
fi
exec "$deno" "$@"