Update version in string in installer files

This commit is contained in:
KIKUCHI Koichiro 2015-11-13 12:02:03 +09:00
parent 0038e7c6e6
commit 2a8af087e6
4 changed files with 28 additions and 9 deletions

View File

@ -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"

View File

@ -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 <slerena@gmail.com>
#
# 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 " "

View File

@ -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 " "

View File

@ -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 " "