Subversion Repositories ALCASAR

Rev

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

Rev 2171 Rev 2454
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-version.sh 2171 2017-04-21 17:39:13Z tom.houdayer $
2
# $Id: alcasar-version.sh 2454 2017-12-09 18:59:31Z tom.houdayer $
3
 
3
 
4
# alcasar-version-list.sh
4
# alcasar-version-list.sh
5
# by Richard REY
5
# by Richard REY
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 24... Line 24...
24
if [ $MAJ_RUNNING_VERSION -lt $MAJ_DNS_VERSION ]
24
if [ $MAJ_RUNNING_VERSION -lt $MAJ_DNS_VERSION ]
25
then
25
then
26
	MAJ="True"
26
	MAJ="True"
27
fi
27
fi
28
#compare minor number
28
#compare minor number
29
if [ $MAJ_RUNNING_VERSION -eq $MAJ_DNS_VERSION ] 
29
if [ $MAJ_RUNNING_VERSION -eq $MAJ_DNS_VERSION ]
30
then
30
then
31
	if [ $MIN_RUNNING_VERSION -lt $MIN_DNS_VERSION ]
31
	if [ $MIN_RUNNING_VERSION -lt $MIN_DNS_VERSION ]
32
	then
32
	then
33
		MAJ="True"
33
		MAJ="True"
34
	fi
34
	fi
Line 39... Line 39...
39
		then
39
		then
40
			if [ -z "$UPD_RUNNING_VERSION" ]
40
			if [ -z "$UPD_RUNNING_VERSION" ]
41
			then
41
			then
42
				MAJ="True"
42
				MAJ="True"
43
			else
43
			else
44
		       		if [ $UPD_RUNNING_VERSION -lt $UPD_DNS_VERSION ]
44
				if [ $UPD_RUNNING_VERSION -lt $UPD_DNS_VERSION ]
45
				then
45
				then
46
					MAJ="True"
46
					MAJ="True"
47
				fi
47
				fi
48
			fi
48
			fi
49
		fi
49
		fi
50
	fi
50
	fi
51
fi
51
fi
52
 
52
 
53
if [ $MAJ = "True" ]
53
if [ $MAJ = "True" ]
54
	then 
54
	then
55
		echo "An updated version is available ($DNS_VERSION)"
55
		echo "An updated version is available ($DNS_VERSION)"
56
	else 
56
	else
57
		echo "The Running version ($RUNNING_VERSION) is up to date"
57
		echo "The Running version ($RUNNING_VERSION) is up to date"
58
fi
58
fi