Another layer of escaping for the escapes in the DB update script
[evergreen-equinox.git] / build / tools / update_db.sh
index 0aa0784..e4130c2 100755 (executable)
@@ -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.