linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

probe-size.sh

(288B)


      1 set -e
      2 
      3 var=$1
      4 out=$2
      5 shift 2
      6 
      7 for size in 8 4 2 1 ; do
      8 	echo "==> trying $var=$size..." >&2
      9 	if "$@" -D "$var=$size" ; then
     10 		echo '==> success' >&2
     11 		echo "#define $var $size" >$out
     12 		exit 0
     13 	fi
     14 done 2>$out.log
     15 
     16 cat $out.log
     17 printf "%s: could not determine %s\n" "$0" "$var" >&2
     18 exit 1