File indexing completed on 2022-11-23 11:08:58

0001 #!/bin/bash
0002 set -e
0003 
0004 $(git diff --quiet && git diff --cached --quiet) || (echo "There are repo changes, giving up."; exit 1)
0005 
0006 ver=`curl -s https://sqlite.org/news.html | grep '<a name.*</a><h3>.* - Release ' | \
0007     sed -e 's/.* - Release \(.*\)<\/.*/\1/' | sort -r | head -n1`
0008 file=src/drivers/CMakeLists.txt
0009 perl -pi -e "s/^set\(SQLITE_RECOMMENDED_VERSION.*/set\(SQLITE_RECOMMENDED_VERSION $ver\)/" $file
0010 git diff --quiet && (echo "Already updated to $ver."; exit 1)
0011 git add $file
0012 git commit -m "GIT_SILENT bump recommended version of SQLite to $ver"
0013 git log -1