opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

probe.sh (179B)


      1 set -e
      2 
      3 if [ "$#" -lt 3 ] ; then
      4 	printf 'usage: %s var out command...\n' "$0" >&2
      5 	exit 2
      6 fi
      7 
      8 var=$1
      9 out=$2
     10 shift 2
     11 if "$@" 2>"$out.log" ; then
     12 	echo "#define $var 1"
     13 fi >"$out"