File: update_recommended_sqlite_ver.sh

package info (click to toggle)
kdb 3.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,276 kB
  • sloc: cpp: 38,360; yacc: 940; python: 779; sh: 711; ansic: 440; lex: 367; xml: 182; sql: 51; makefile: 10
file content (13 lines) | stat: -rwxr-xr-x 563 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
set -e

$(git diff --quiet && git diff --cached --quiet) || (echo "There are repo changes, giving up."; exit 1)

ver=`curl -s https://sqlite.org/news.html | grep '<a name.*</a><h3>.* - Release ' | \
    sed -e 's/.* - Release \(.*\)<\/.*/\1/' | sort -r | head -n1`
file=src/drivers/CMakeLists.txt
perl -pi -e "s/^set\(SQLITE_RECOMMENDED_VERSION.*/set\(SQLITE_RECOMMENDED_VERSION $ver\)/" $file
git diff --quiet && (echo "Already updated to $ver."; exit 1)
git add $file
git commit -m "GIT_SILENT bump recommended version of SQLite to $ver"
git log -1