uCBQN/build/build
dzaima b237f170fb bump for_build binary
hasn't been bumped since •file.RealPath was added, which Singeli currently conditionally uses (and thus won't in older for_build-s); now •file.RealPath will be guaranteed to exist at build-time
2023-08-19 18:25:52 +03:00

22 lines
616 B
Bash
Executable File

#!/usr/bin/env bash
DIR="$(dirname $0)"
PREV_BQN="$DIR/obj2/for_build4"
if [ ! -f "$PREV_BQN" ]; then
TMP_BQN="$DIR/obj2/for_build_tmp"
if make -C "$DIR/.." for-build OUTPUT="$TMP_BQN"; then
if [ "4" = "$("$TMP_BQN" -p "2+2")" ]; then
true
else
echo "automatically-built bootstrap CBQN doesn't behave as expected; run 'make for-build' with necessary configuration manually"
exit 1
fi
else
echo "failed to build bootstrap CBQN; run 'make for-build' with necessary configuration manually"
exit 1
fi
cp "$TMP_BQN" "$PREV_BQN"
fi
"$PREV_BQN" "$DIR/src/build.bqn" "$@"