From c0d950b687019d89e781f5a0ecf56f4addc221eb Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 14 Oct 2010 21:18:00 -0400 Subject: [PATCH] Add some replacement to set the expected AWL version. This is kinda dodgy because AWL is external, so we expect it to be unpacked in a parallel 'awl' directory. Otherwise we will not change what is already coded into htdocs/always.php --- scripts/build-always.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build-always.sh b/scripts/build-always.sh index 2215515e..bdc35326 100755 --- a/scripts/build-always.sh +++ b/scripts/build-always.sh @@ -5,6 +5,11 @@ DAVICAL_VERSION="`head -n1 VERSION`" DB_VERSION="`grep 'SELECT new_db_revision' dba/davical.sql | cut -f2 -d'(' | cut -f1-3 -d,`" +AWL_VERSION="`head -n1 ../awl/VERSION`" +if [ -z "${AWL_VERSION}" ] ; then + AWL_VERSION="`grep 'want_awl_version' htdocs/always.php | cut -f2 -d= | cut -f1 -d';'`" +fi 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});/" + -e "/^ *.c->want_dbversion *=.*$/ s/^ *.c->want_dbversion *=.*$/\$c->want_dbversion = array(${DB_VERSION});/" \ + -e "/^ *.c->want_awl_version *=.*$/ s/^ *.c->want_awl_version *=.*$/\$c->want_awl_version = ${AWL_VERSION};/"