Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-version.sh 1827 2016-04-19 09:47:29Z raphael.pion $
|
2 |
# $Id: alcasar-version.sh 2171 2017-04-21 17:39:13Z 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 |
|
8 |
# récupère les versions d'ALCASAR (stable et développement)
|
8 |
# récupère les versions d'ALCASAR (stable et développement)
|
9 |
# download the ALCASAR versions (stable / dev)
|
9 |
# download the ALCASAR versions (stable / dev)
|
10 |
|
10 |
|
11 |
VERSION="/var/www/html/VERSION"
|
- |
|
12 |
SITE_VERSION="version.alcasar.net"
|
11 |
SITE_VERSION="version.alcasar.net"
|
13 |
MAJ="False"
|
12 |
MAJ="False"
|
14 |
DNS_VERSION_L=`dig $SITE_VERSION txt | grep ^$SITE_VERSION | cut -d"\"" -f2`
|
13 |
DNS_VERSION_L=`dig $SITE_VERSION txt | grep ^$SITE_VERSION | cut -d"\"" -f2`
|
15 |
DNS_VERSION=`echo $DNS_VERSION_L|cut -d" " -f1`
|
14 |
DNS_VERSION=`echo $DNS_VERSION_L|cut -d" " -f1`
|
16 |
MAJ_DNS_VERSION=`echo $DNS_VERSION|cut -d"." -f1`
|
15 |
MAJ_DNS_VERSION=`echo $DNS_VERSION|cut -d"." -f1`
|
17 |
MIN_DNS_VERSION=`echo $DNS_VERSION|cut -d"." -f2`
|
16 |
MIN_DNS_VERSION=`echo $DNS_VERSION|cut -d"." -f2`
|
18 |
UPD_DNS_VERSION=`echo $DNS_VERSION|cut -d"." -f3`
|
17 |
UPD_DNS_VERSION=`echo $DNS_VERSION|cut -d"." -f3`
|
19 |
RUNNING_VERSION=`cat $VERSION|cut -d" " -f1`
|
18 |
RUNNING_VERSION=`grep ^VERSION /usr/local/etc/alcasar.conf|cut -d'=' -f2`
|
20 |
MAJ_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f1`
|
19 |
MAJ_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f1`
|
21 |
MIN_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f2|cut -c1`
|
20 |
MIN_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f2|cut -c1`
|
22 |
UPD_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f3`
|
21 |
UPD_RUNNING_VERSION=`echo $RUNNING_VERSION|cut -d"." -f3`
|
23 |
|
22 |
|
24 |
#compare major number
|
23 |
#compare major number
|