Add script to fetch+build sqlite

This commit is contained in:
Colin Dellow 2018-03-02 18:46:40 -05:00
parent 8b9b3bcc9d
commit 811badc9f9
2 changed files with 37 additions and 0 deletions

7
.gitignore vendored
View File

@ -30,3 +30,10 @@
*.exe
*.out
*.app
# vim
*.swp
# transient sqlite files
/sqlite
/sqlite-autoconf*

30
build-sqlite Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
set -euo pipefail
VERSION=3220000
fetch_if_needed() {
if [ ! -e sqlite ]; then
curl --fail "https://sqlite.org/2018/sqlite-autoconf-${VERSION}.tar.gz" > sqlite.tar.gz
tar xf sqlite.tar.gz
rm sqlite.tar.gz
ln -s sqlite-autoconf-${VERSION} sqlite
fi
}
build() {
cd sqlite
./configure
make
}
main() {
here=$(dirname "${BASH_SOURCE[0]}")
here=$(readlink -f "$here")
cd "$here"
fetch_if_needed
build
}
main "$@"