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