summaryrefslogtreecommitdiff
path: root/scripts/probe.sh
blob: 093a16dc2ac89b3e12fc7883a772ea5f6ad39ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
set -e

if [ "$#" -lt 2 ] ; then
	echo 'usage: probe.sh var command...' >&2
	exit 2
fi

var=$1
shift
if "$@" 2>/dev/null ; then
	echo "#define $var 1"
fi