]> git.ipfire.org Git - ipfire-2.x.git/blame - src/scripts/updatesetup
HinzugefĆ¼gt:
[ipfire-2.x.git] / src / scripts / updatesetup
CommitLineData
cd1a2927
MT
1#!/bin/bash
2
3UPGRADEVERSION="1.4.x" # configured by ./make.sh newupdate
4PREVIOUSVERSION="1.4."$((`echo $UPGRADEVERSION | /usr/bin/cut -f3 -d '.'`-1))
5echo "This is the $UPGRADEVERSION update patch for IPCop $PREVIOUSVERSION installing."
6
ee4fdd07 7CURRENTVERSION=`perl -e "require '/var/ipfire/general-functions.pl';print \\$General::version;"`
cd1a2927
MT
8if [ "$CURRENTVERSION" != "$PREVIOUSVERSION" ]; then
9 echo "You are not running IPCop v$PREVIOUSVERSION for this patch to install."
10 echo "Aborting installation."
11 exit -1
12fi
13
14# general-functions might not be overwrited by patch...
ee4fdd07 15/bin/sed -i -e "s+= '1.4.*$+= '$UPGRADEVERSION';+" /var/ipfire/general-functions.pl
cd1a2927
MT
16
17/bin/tar -zxpf patch.tar.gz -C /
18
19#build cachelang file after all "lang/*.pl" updates
ee4fdd07 20perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"
cd1a2927
MT
21
22killall mingetty #redisplay correct version
23echo "end of $UPGRADEVERSION update"