preflight.sh (view raw)
1set -e
2
3go version > /dev/null 2>&1 || (echo go 1.16+ is required && false)
4
5v=`go version | egrep -o 'go1[^ ]+'`
6case $v in
7 go1.10*|go1.11*|go1.12*|go1.13*|go1.14*|go1.15*)
8 echo go version is too old: $v
9 echo go 1.16+ is required
10 false
11 ;;
12 go1.1*)
13 # just pretend nobody is still using go 1.1 or 1.2
14 ;;
15 go1.2*)
16 ;;
17 *)
18 echo unknown go version: $v
19 false
20 ;;
21esac
22
23if [ \! \( -e /usr/include/sqlite3.h -o -e /usr/local/include/sqlite3.h \) ] ; then
24 echo unable to find sqlite3.h header
25 echo please install libsqlite3 dev package
26 false
27fi
28
29touch .preflightcheck
30