quakeforge/tools/qfcc/test/build-compile-pass-run
Bill Currie 55705dac83 [qfcc] Only compile in the compile-only tests
The source tree is made read-only by `make distcheck`, so writing
temporary files to the source directory is a no-no (really, it's a bit
of a bug in qfcc, as per #51).
2023-07-10 11:04:17 +09:00

16 lines
178 B
Bash
Executable file

#! /bin/sh
script=$1
shift
cat > $script <<EOF
#! /bin/sh
# compile must pass
$@ -o $script.qfo
if test \$? != 0; then
exit 1
fi
rm -f $script.qfo
exit 0
EOF
chmod +x $script