mirror of
				https://github.com/cldellow/sqlite-parquet-vtable.git
				synced 2025-11-04 02:39:56 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			524 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			524 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
set -euo pipefail
 | 
						|
 | 
						|
VERSION=3240000
 | 
						|
 | 
						|
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
 | 
						|
    mv sqlite-autoconf-${VERSION} sqlite
 | 
						|
  fi
 | 
						|
}
 | 
						|
 | 
						|
build() {
 | 
						|
  cd sqlite
 | 
						|
  ./configure --enable-readline
 | 
						|
 | 
						|
  if [ ! -v PREBUILT ]; then
 | 
						|
    make -j$(nproc)
 | 
						|
  fi
 | 
						|
}
 | 
						|
 | 
						|
main() {
 | 
						|
  here=$(dirname "${BASH_SOURCE[0]}")
 | 
						|
  here=$(readlink -f "$here")
 | 
						|
  cd "$here"
 | 
						|
 | 
						|
  fetch_if_needed
 | 
						|
  build
 | 
						|
}
 | 
						|
 | 
						|
main "$@"
 |