Add a script for building always.php to include DB version also.

This commit is contained in:
Andrew McMillan committed 2009-10-27 09:17:07 +13:00
1 parent 06b1cdbe68
commit e6507ee01f
2 files changed
+16 -6

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
#
# Apply the current version numbers into always.php from always.php.in
#
DAVICAL_VERSION="`head -n1 VERSION`"
DB_VERSION="`grep 'SELECT new_db_revision' dba/davical.sql | cut -f2 -d'(' | cut -f1-3 -d,`"
sed -e "/^ *.c->version_string *= *'[^']*' *;/ s/^ *.c->version_string *= *'[^']*' *;/\$c->version_string = '${DAVICAL_VERSION}';/" \
-e "/^ *.c->want_dbversion *=.*$/ s/^ *.c->want_dbversion *=.*$/\$c->want_dbversion = array(${DB_VERSION});/"