xrforge-v2/util/xrforge.sh

32 lines
752 B
Bash
Raw Normal View History

2026-05-15 13:22:33 +02:00
#!/usr/bin/env sh
OUTDIR=result/bin
REDBEAN_URL="https://redbean.dev/redbean-3.0.0.com"
REDBEAN_CRC="382f1288bb96ace4bab5145e7df236846c33cc4f1be69233710682a9e71e7467 $OUTDIR/xrforge.com"
download(){
redbean(){
test -d $OUTDIR || mkdir -p $OUTDIR
rm $OUTDIR/*.com || true # delete old
verify(){
echo "$REDBEAN_CRC" > /tmp/checksum
sha256sum -c /tmp/checksum || { echo "psuedosecurity checksum failed"; exit 1; }
chmod +x $OUTDIR/xrforge.com
}
2026-07-21 19:19:52 +02:00
test -f /tmp/xrforge.com || wget --no-check-certificate "$REDBEAN_URL" -O /tmp/xrforge.com
2026-05-15 13:22:33 +02:00
cp /tmp/xrforge.com $OUTDIR/xrforge.com
verify
}
"$@"
}
build(){
download redbean
2026-07-21 19:19:52 +02:00
cd src
2026-07-22 18:36:02 +02:00
zip -r ../result/bin/xrforge.com * .lua .init.lua .args
2026-05-15 13:22:33 +02:00
}
"$@"