From 3d071af983c168fdbfba062eedc2bedbb5bbdf1b Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 22 Mar 2011 00:40:44 +0000 Subject: [PATCH] Another layer of escaping for the escapes in the DB update script Apologies for the previous patch that led to breakage; I "tested" in a script in which I had already hardcoded the answer I wanted after running into problems with the previous version of the script. Not good testing practice. Thanks to Bill Erickson for suggesting the extra escapes. Tested in a clean environment this time, and it works. git-svn-id: svn://svn.open-ils.org/ILS/trunk@19843 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- build/tools/update_db.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tools/update_db.sh b/build/tools/update_db.sh index 0aa07847e3..e4130c26b6 100755 --- a/build/tools/update_db.sh +++ b/build/tools/update_db.sh @@ -56,7 +56,7 @@ function feedback() { PSQL_ACCESS="-h $DB_HOST -U $DB_USER $DB_NAME"; # Need to avoid versions like '1.6.0.4' from throwing off the upgrade -VERSION=$(psql -c "SELECT MAX(version) FROM config.upgrade_log WHERE version ~ E'^\\d+$'" -t $PSQL_ACCESS); +VERSION=$(psql -c "SELECT MAX(version) FROM config.upgrade_log WHERE version ~ E'^\\\\d+$'" -t $PSQL_ACCESS); [ $? -gt 0 ] && die "Database access failed."; # [ $VERBOSE ] && echo RAW VERSION: $VERSION # TODO: for verbose mode VERSION=$(echo $VERSION | sed -e 's/^ *0*//'); # This is a separate step so we can check $? above. -- 2.43.2