Subversion Repositories ALCASAR

Rev

Rev 3152 | Rev 3170 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3152 Rev 3163
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 3152 2023-11-29 21:41:26Z rexy $
2
# $Id: alcasar-conf.sh 3163 2023-12-19 18:17:16Z rexy $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by REXY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 120... Line 120...
120
 
120
 
121
###################################################
121
###################################################
122
##           Load an archive conf file           ##
122
##           Load an archive conf file           ##
123
###################################################
123
###################################################
124
	--load|-load)
124
	--load|-load)
-
 
125
		if [ ! -f /var/tmp/alcasar-conf.tar.gz ]; then
-
 
126
			echo "Conf file not found (/var/tmp/alcasar-conf.tar.gz) !"
-
 
127
			return 1
-
 
128
		fi
125
		CURRENT_DIR=`pwd`  # install folder
129
		CURRENT_DIR=`pwd`  # install folder
126
		cd /var/tmp || { echo "Unable to find /var/tmp directory"; }
130
		cd /var/tmp
127
		tar -xf alcasar-conf.tar.gz
131
		tar -xf alcasar-conf.tar.gz
128
# update alcasar.conf parameters
132
# update alcasar.conf parameters
129
		PREVIOUS_VERSION=`grep ^VERSION= $DIR_UPDATE/etc/alcasar.conf|cut -d"=" -f2`
133
		PREVIOUS_VERSION=`grep ^VERSION= $DIR_UPDATE/etc/alcasar.conf|cut -d"=" -f2`
130
		MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
134
		MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1`
131
		MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`
135
		MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2`