summaryrefslogtreecommitdiff
path: root/scripts/probe.sh
blob: cf3061103a03b1d50b02b44a23828227bacee4fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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" >"$out"
fi