From 2a8af087e6d8728e9c4e9e18c40b5a1c3d10d048 Mon Sep 17 00:00:00 2001 From: KIKUCHI Koichiro Date: Fri, 13 Nov 2015 12:02:03 +0900 Subject: [PATCH] Update version in string in installer files --- extras/pandora_update_version.sh | 17 +++++++++++++++++ pandora_agents/unix/pandora_agent_installer | 6 +++--- pandora_console/pandora_console_install | 10 +++++----- pandora_server/pandora_server_installer | 4 +++- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/extras/pandora_update_version.sh b/extras/pandora_update_version.sh index 8d978cc213..d92cd9f10a 100755 --- a/extras/pandora_update_version.sh +++ b/extras/pandora_update_version.sh @@ -36,6 +36,9 @@ $CODEHOME/pandora_server/DEBIAN \ $CODEHOME/pandora_agents/unix/DEBIAN \ $PANDHOME_ENT/pandora_console/DEBIAN \ $PANDHOME_ENT/pandora_server/PandoraFMS-Enterprise/DEBIAN" +INSTALLER_FILES="$CODEHOME/pandora_console/pandora_console_install \ +$CODEHOME/pandora_server/pandora_server_installer \ +$CODEHOME/pandora_agents/unix/pandora_agent_installer" SERVER_FILE="$CODEHOME/pandora_server/lib/PandoraFMS/Config.pm" SERVER_DB_FILE="$CODEHOME/pandora_server/util/pandora_db.pl" SERVER_CLI_FILE="$CODEHOME/pandora_server/util/pandora_manage.pl" @@ -76,6 +79,14 @@ function update_deb_version { sed -e "s/^pandora_version\s*=.*/pandora_version=\"$LOCAL_VERSION\"/" "$DEBIAN_DIR/make_deb_package.sh" > "$TEMP_FILE" && mv "$TEMP_FILE" "$DEBIAN_DIR/make_deb_package.sh" && sed -e "s/^Version:\s*.*/Version: $LOCAL_VERSION/" "$DEBIAN_DIR/control" > "$TEMP_FILE" && mv "$TEMP_FILE" "$DEBIAN_DIR/control" } +# Update version in installer +function update_installer_version { + FILE=$1 + + sed -e "/^PI_VERSION/s/=.*/=\"$VERSION\"/" -e "/^PI_BUILD/s/=.*/=\"$BUILD\"/" "$FILE" > "$TEMP_FILE" \ + && mv "$TEMP_FILE" "$FILE" +} + # Spec files for file in $SPEC_FILES; do echo "Updating spec file $file..." @@ -88,6 +99,12 @@ for dir in $DEBIAN_FILES; do update_deb_version $dir done +# Installer files +for file in $INSTALLER_FILES; do + echo "Updating installer file $file..." + update_installer_version $file +done + # Pandora Server echo "Updating Pandora Server version..." sed -e "s/my\s\s*\$pandora_version\s*=.*/my \$pandora_version = \"$VERSION\";/" "$SERVER_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$SERVER_FILE" diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer index acb498cd1b..a8bb536342 100755 --- a/pandora_agents/unix/pandora_agent_installer +++ b/pandora_agents/unix/pandora_agent_installer @@ -2,14 +2,14 @@ # ********************************************************************** # Pandora FMS Agent Installer for Unix (generic installer) -# (c) 2008-2010 Artica ST +# (c) 2008-2015 Artica ST # (c) 2008-2010 Sancho Lerena # # This is a generic installer for all Unix-like systems.(AIX, HP-UX, SunOS, Linux, FreeBSD, NetBSD) # Please see http://www.pandorafms.org. This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION=4.0 +PI_VERSION=6.0 PI_BUILD=110923 OS_NAME=`uname -s` @@ -519,7 +519,7 @@ fi # Script banner at start echo " " -echo "Pandora FMS Agent UNIX Installer $PI_VERSION $PI_BUILD (c) 2008-2010 ArticaST" +echo "Pandora FMS Agent UNIX Installer $PI_VERSION $PI_BUILD (c) 2008-2015 ArticaST" echo "This program is licensed under GPL2 Terms. http://pandorafms.com" echo " " diff --git a/pandora_console/pandora_console_install b/pandora_console/pandora_console_install index 5b3bd3b93f..ce91daead2 100755 --- a/pandora_console/pandora_console_install +++ b/pandora_console/pandora_console_install @@ -1,15 +1,15 @@ #!/bin/sh -# Pandora FMS Console Installer (c) 2008-2011 Artica ST -# Linux/FreeBSD Version (generic), for SuSe, Debian/Ubuntu, RHEL/CentOS, -# Fedora and FreeBSD only +# Pandora FMS Console Installer (c) 2008-2015 Artica ST +# Linux/FreeBSD/NetBSD Version (generic), for SuSe, Debian/Ubuntu, +# RHEL/CentOS, Fedora, FreeBSD and NetBSD only # other Linux distros could not work properly without modifications # Please see http://www.pandorafms.org # v4.0dev Build 110203 # This code is licensed under GPL 2.0 license. # ********************************************************************** -PI_VERSION=4.0 +PI_VERSION=6.0 FORCE=0 DESTDIR="" LOG_TIMESTAMP=`date +"%Y/%m/%d %H:%M:%S"` @@ -226,7 +226,7 @@ help () { # Script banner at start echo " " -echo "Pandora FMS Console Installer $PI_VERSION (c) 2008-2014 ArticaST" +echo "Pandora FMS Console Installer $PI_VERSION $PI_BUILD (c) 2008-2015 ArticaST" echo "This program is licensed under GPL2 Terms. http://pandorafms.com" echo " " diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer index 9f41f614f6..76db4c3681 100755 --- a/pandora_server/pandora_server_installer +++ b/pandora_server/pandora_server_installer @@ -8,6 +8,8 @@ # This code is licensed under GPL 2.0 license. # ********************************************************************** +PI_VERSION="6.0" +PI_BUILD="151113" MODE=$1 if [ $# -gt 1 ]; then @@ -487,7 +489,7 @@ help () { # Script banner at start echo " " -echo "Pandora FMS 5.1 Server Installer (c) 2008-2014 Artica ST" +echo "Pandora FMS Server Installer $PI_VERSION $PI_BUILD (c) 2008-2015 Artica ST" echo "This program is licensed under GPL2 Terms. http://pandorafms.com" echo " "