honk/preflight.sh

31 lines
583 B
Bash
Raw Normal View History

set -e
2022-05-31 08:32:22 +02:00
go version > /dev/null 2>&1 || (echo go 1.16+ is required && false)
v=`go version | egrep -o 'go1[^ ]+'`
case $v in
2022-05-31 08:32:22 +02:00
go1.10*|go1.11*|go1.12*|go1.13*|go1.14*|go1.15*)
echo go version is too old: $v
2022-05-31 08:32:22 +02:00
echo go 1.16+ is required
false
;;
go1.1*)
# just pretend nobody is still using go 1.1 or 1.2
;;
go1.2*)
;;
*)
echo unknown go version: $v
false
;;
esac
if [ \! \( -e /usr/include/sqlite3.h -o -e /usr/local/include/sqlite3.h \) ] ; then
echo unable to find sqlite3.h header
echo please install libsqlite3 dev package
false
fi
touch .preflightcheck