From 2e043210b23ed9b76b81ee6cd29a80bab5b0f80a Mon Sep 17 00:00:00 2001 From: deajan Date: Wed, 30 Nov 2016 13:30:14 +0100 Subject: [PATCH] Upgrade script now handles headers on BSD / Mac --- upgrade-v1.x-2.1x.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upgrade-v1.x-2.1x.sh b/upgrade-v1.x-2.1x.sh index dfd6795..a88deaf 100755 --- a/upgrade-v1.x-2.1x.sh +++ b/upgrade-v1.x-2.1x.sh @@ -7,7 +7,7 @@ CONTACT="http://www.netpower.fr/obacup - ozy@netpower.fr" OLD_PROGRAM_VERSION="v1.x" NEW_PROGRAM_VERSION="v2.1x" CONFIG_FILE_VERSION=2016102301 -PROGRAM_BUILD=2016091402 +PROGRAM_BUILD=2016113001 if ! type "$BASH" > /dev/null; then echo "Please run this script only with bash shell. Tested on bash >= 3.2" @@ -313,7 +313,7 @@ function UpdateConfigHeader { local config_file="${1}" # "onfig file rev" to deal with earlier variants of the file - sed -i'.tmp' '/onfig file rev/c\###### '$SUBPROGRAM' config file rev '$CONFIG_FILE_VERSION' '$NEW_PROGRAM_VERSION "$config_file" + sed -i'.tmp' 's/.*onfig file rev.*/##### '$SUBPROGRAM' config file rev '$CONFIG_FILE_VERSION' '$NEW_PROGRAM_VERSION'/' "$config_file" rm -f "$config_file.tmp" }