diff --git a/extras/ChangeLog b/extras/ChangeLog index b344b5bbe0..f610ffb9e6 100644 --- a/extras/ChangeLog +++ b/extras/ChangeLog @@ -1,3 +1,8 @@ +2010-11-03 Ramon Novoa + + * pandora_update_version.sh: Fixed the regular expression that matches + the InstallVersion token. + 2010-11-03 Ramon Novoa * pandora_update_version.sh: Update the InstallJammer mpi file. diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh index 27403bcce8..d28a23656f 100755 --- a/extras/pandora_update_version.sh +++ b/extras/pandora_update_version.sh @@ -99,7 +99,7 @@ echo "Updating Pandora Windows Agent version..." sed -e "s/\s*#define\s*PANDORA_VERSION\s*.*/#define PANDORA_VERSION (\"$VERSION(Build $BUILD)\")/" "$AGENT_WIN_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$AGENT_WIN_FILE" sed -e "s/{Pandora FMS Windows Agent v.*}/{Pandora FMS Windows Agent v$VERSION}/" "$AGENT_WIN_MPI_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$AGENT_WIN_MPI_FILE" NUMERIC_VERSION=$(echo $VERSION | sed -e "s/\([0-9]*\.[0-9]*\).*/\1/") -sed -n "1h;1!H;\${;g;s/InstallVersion[\r\n]{.*}/InstallVersion\n{$NUMERIC_VERSION.0.0}/g;p;}" "$AGENT_WIN_MPI_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$AGENT_WIN_MPI_FILE" +sed -n "1h;1!H;\${;g;s/InstallVersion[\r\n]{\S*}/InstallVersion\n{$NUMERIC_VERSION.0.0}/g;p;}" "$AGENT_WIN_MPI_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$AGENT_WIN_MPI_FILE" rm -f "$TEMP_FILE"