Files
oasis-linux-mirror/scripts/probe.sh
Michael Forney 7a8d4491c8 probe: Create output when test fails
This was a regression in 785b495ba7.
2020-06-16 13:48:09 -07:00

14 lines
179 B
Bash

set -e
if [ "$#" -lt 3 ] ; then
printf 'usage: %s var out command...\n' "$0" >&2
exit 2
fi
var=$1
out=$2
shift 2
if "$@" 2>"$out.log" ; then
echo "#define $var 1"
fi >"$out"