Skip to content

Commit e55cdf9

Browse files
committed
Update download sqlite shell script to accept arg
1 parent fec606c commit e55cdf9

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

bin/download_sqlite.sh

+11-6
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,25 @@ set -e
66
# https://sqlite.org/download.html
77
# https://www.sqlite.org/src/timeline?r=version-3.36.0
88
# VERSION consists of 7 digits, like:3350000 for "3.35.5" or 3360000 for "3.36.0"
9+
#
10+
# Execute with:
11+
#
12+
# bin/download_sqlite.sh 3460100
13+
#
914

1015
mkdir -p tmp
1116
pushd tmp
1217

13-
wget https://sqlite.org/2024/sqlite-autoconf-$VERSION.tar.gz
18+
wget https://sqlite.org/2024/sqlite-autoconf-$1.tar.gz
1419

15-
tar xvfz sqlite-autoconf-$VERSION.tar.gz
20+
tar xvfz sqlite-autoconf-$1.tar.gz
1621

17-
cp sqlite-autoconf-$VERSION/sqlite3.c ../c_src/
18-
cp sqlite-autoconf-$VERSION/sqlite3.h ../c_src/
19-
cp sqlite-autoconf-$VERSION/sqlite3ext.h ../c_src/
22+
cp sqlite-autoconf-$1/sqlite3.c ../c_src/
23+
cp sqlite-autoconf-$1/sqlite3.h ../c_src/
24+
cp sqlite-autoconf-$1/sqlite3ext.h ../c_src/
2025

2126
rm -rf sqlite-autoconf-*
2227

2328
popd
2429

25-
echo "UPDATED SQLITE C CODE TO $VERSION!"
30+
echo "UPDATED SQLITE C CODE TO $1!"

0 commit comments

Comments
 (0)