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
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-23 15:20:25 +02:00
|
|
|
janusweb(){
|
|
|
|
|
version=1.7.4
|
|
|
|
|
test -f janusweb-${version}.tar.gz || {
|
|
|
|
|
wget "https://github.com/jbaicoianu/janusweb/releases/download/v${version}/janusweb-${version}.tar.gz"
|
|
|
|
|
tar -xvf janusweb-${version}.tar.gz
|
|
|
|
|
mv janusweb-${version} src/v
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-15 13:22:33 +02:00
|
|
|
"$@"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
build(){
|
|
|
|
|
download redbean
|
2026-07-23 21:34:09 +02:00
|
|
|
download janusweb
|
2026-07-21 19:19:52 +02:00
|
|
|
cd src
|
2026-07-24 17:06:31 +02:00
|
|
|
zip -yr ../result/bin/xrforge.com * .lua .init.lua .args
|
2026-05-15 13:22:33 +02:00
|
|
|
}
|
|
|
|
|
|
2026-07-23 15:20:25 +02:00
|
|
|
rebuild(){
|
|
|
|
|
cd src
|
2026-07-24 17:06:31 +02:00
|
|
|
zip -yr ../result/bin/xrforge.com .lua page plugin cmd css .init.lua .args test myverse
|
2026-07-23 15:20:25 +02:00
|
|
|
}
|
|
|
|
|
|
2026-05-15 13:22:33 +02:00
|
|
|
"$@"
|