uCBQN/build/build
dzaima 0ae0be135c bump for_build binary
has been over a year
2025-05-01 22:53:45 +03:00

22 lines
625 B
Bash
Executable File

#!/usr/bin/env sh
DIR="$(dirname $0)"
PREV_BQN="$DIR/obj2/for_build5"
if [ ! -f "$PREV_BQN" ]; then
TMP_BQN="$DIR/obj2/for_build_tmp"
if "${MAKE:-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
mv "$TMP_BQN" "$PREV_BQN"
fi
"$PREV_BQN" "$DIR/src/build.bqn" "$@"