2018-03-02 23:46:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
2021-05-18 06:59:57 +00:00
|
|
|
VERSION=3352000
|
2018-03-02 23:46:40 +00:00
|
|
|
|
|
|
|
fetch_if_needed() {
|
|
|
|
if [ ! -e sqlite ]; then
|
2020-10-19 12:00:54 +00:00
|
|
|
curl --fail "https://sqlite.org/2020/sqlite-autoconf-${VERSION}.tar.gz" > sqlite.tar.gz
|
2018-03-02 23:46:40 +00:00
|
|
|
tar xf sqlite.tar.gz
|
|
|
|
rm sqlite.tar.gz
|
2018-06-25 01:11:07 +00:00
|
|
|
mv sqlite-autoconf-${VERSION} sqlite
|
2018-03-02 23:46:40 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd sqlite
|
2019-11-27 20:28:18 +00:00
|
|
|
./configure --enable-readline
|
2018-07-06 03:36:30 +00:00
|
|
|
|
|
|
|
if [ ! -v PREBUILT ]; then
|
|
|
|
make -j$(nproc)
|
|
|
|
fi
|
2018-03-02 23:46:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main() {
|
|
|
|
here=$(dirname "${BASH_SOURCE[0]}")
|
|
|
|
here=$(readlink -f "$here")
|
|
|
|
cd "$here"
|
|
|
|
|
|
|
|
fetch_if_needed
|
|
|
|
build
|
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|