From a873132f60af954c0f9f601d155fb4d9a46a1199 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 3 Nov 2010 17:23:26 +0000 Subject: [PATCH] 2010-11-03 Ramon Novoa * pandora_update_version.sh: Update the InstallJammer mpi file. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3506 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- extras/ChangeLog | 3 +++ extras/pandora_update_version.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/extras/ChangeLog b/extras/ChangeLog index 01bf1b2750..b344b5bbe0 100644 --- a/extras/ChangeLog +++ b/extras/ChangeLog @@ -1,3 +1,6 @@ +2010-11-03 Ramon Novoa + + * pandora_update_version.sh: Update the InstallJammer mpi file. 2010-09-22 Sancho Lerena diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh index 07ef1983ad..27403bcce8 100755 --- a/extras/pandora_update_version.sh +++ b/extras/pandora_update_version.sh @@ -37,6 +37,7 @@ CONSOLE_DB_FILE="$CODE_HOME/pandora_console/pandoradb_data.sql" CONSOLE_FILE="$CODE_HOME/pandora_console/include/config_process.php" AGENT_UNIX_FILE="$CODE_HOME/pandora_agents/unix/pandora_agent" AGENT_WIN_FILE="$CODE_HOME/pandora_agents/win32/pandora.cc" +AGENT_WIN_MPI_FILE="$CODE_HOME/pandora_agents/win32/installer/pandora.mpi" # Update version in spec files function update_spec_version { @@ -96,6 +97,9 @@ sed -e "s/\s*use\s*constant\s*AGENT_VERSION =>.*/use constant AGENT_VERSION => ' sed -e "s/\s*use\s*constant\s*AGENT_BUILD =>.*/use constant AGENT_BUILD => '$BUILD';/" "$AGENT_UNIX_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$AGENT_UNIX_FILE" 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" rm -f "$TEMP_FILE"