all repos — honk @ b602d33e4b4c03dc9a1a172ec4a850152d4bc11b

my fork of honk

preflight.sh (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
set -e

go version > /dev/null 2>&1 || (echo go 1.18+ is required && false)

v=`go version | egrep -o "go1\.[^.]+"` || echo failed to identify go version
if [ "$v" \< "go1.18" ] ; then
	echo go version is too old: $v
	echo go 1.18+ is required
	false
fi

sqlhdr=
if [ `uname` = "Darwin" ] ; then
	: # okay
else
	if [ -e /usr/include/sqlite3.h ] ; then
		sqlhdr=/usr/include/sqlite3.h
	elif [ -e /usr/local/include/sqlite3.h ] ; then
		sqlhdr=/usr/local/include/sqlite3.h
	else
		echo unable to find sqlite3.h header
		echo please install libsqlite3 dev package
		false
	fi
	sqlvers=`grep "#define SQLITE_VERSION_NUMBER" $sqlhdr | cut -f3 -d' '`
	if [ $sqlvers -lt 3034000 ] ; then
		echo sqlite3.h header is too old: $sqlvers
		echo version 3.34.0+ is required
		false
	fi
fi

touch .preflightcheck