test
This commit is contained in:
parent
cdb94c9a40
commit
f2035a6eef
1 changed files with 34 additions and 11 deletions
41
archdi
41
archdi
|
@ -13,16 +13,14 @@
|
||||||
|
|
||||||
|
|
||||||
apptitle="Arch Linux Desktop Install (archdi) - Version: 2015.04.26.22.14.52 (GPLv3)"
|
apptitle="Arch Linux Desktop Install (archdi) - Version: 2015.04.26.22.14.52 (GPLv3)"
|
||||||
|
version="2015.04.26.22.14.52"
|
||||||
cachedir=~/.cache/archdi
|
cachedir=~/.cache/archdi
|
||||||
|
|
||||||
liburl=https://raw.githubusercontent.com/MatMoul/archdi-pkg/master/lib
|
liburl1=http://archdi.sourceforge.net/archdi-lib
|
||||||
#liburl=http://archdi.sourceforge.net/archdi/archdi-lib
|
liburl2=https://raw.githubusercontent.com/MatMoul/archdi-pkg/master/lib
|
||||||
|
|
||||||
#lastversionurl=https://raw.githubusercontent.com/MatMoul/archdi/NewCodeStructure/version
|
|
||||||
#lastversionurl=https://raw.githubusercontent.com/MatMoul/archdi/master/version
|
|
||||||
#lastversionurl=http://archdi.sourceforge.net/archdi/version
|
|
||||||
#version="2015.04.26.22.14.52"
|
|
||||||
|
|
||||||
|
lastverurl1=https://raw.githubusercontent.com/MatMoul/archdi/master/version
|
||||||
|
lastverurl2=http://archdi.sourceforge.net/archdi/version
|
||||||
|
|
||||||
|
|
||||||
help(){
|
help(){
|
||||||
|
@ -62,12 +60,33 @@ dependencies(){
|
||||||
needinstall="false"
|
needinstall="false"
|
||||||
clear
|
clear
|
||||||
echo "Checking internet and server connexion ..."
|
echo "Checking internet and server connexion ..."
|
||||||
|
lastver=$lastverurl1
|
||||||
|
lastversion=$(curl $lastver)
|
||||||
|
if [ "$?" = "0" ] && [ "${#lastversion}" = "19" ]; then
|
||||||
|
liburl=$liburl1
|
||||||
|
else
|
||||||
|
lastver=$lastverurl2
|
||||||
|
lastversion=$(curl $lastver)
|
||||||
|
if [ "$?" = "0" ] && [ "${#lastversion}" = "19" ]; then
|
||||||
|
liburl=$liburl2
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
liburl=$liburl1
|
||||||
|
if (curl $liburl 1>/dev/null 2>/dev/null) then
|
||||||
|
echo "Connexion OK."
|
||||||
|
else
|
||||||
|
liburl=$liburl2
|
||||||
if (curl $liburl 1>/dev/null 2>/dev/null) then
|
if (curl $liburl 1>/dev/null 2>/dev/null) then
|
||||||
echo "Connexion OK."
|
echo "Connexion OK."
|
||||||
else
|
else
|
||||||
echo "No connexion, please check your internet connexion !"
|
echo "No connexion, please check your internet connexion !"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "Checking $apptitle dependencies :"
|
echo "Checking $apptitle dependencies :"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -108,9 +127,13 @@ dependencies(){
|
||||||
|
|
||||||
chkupgrade(){
|
chkupgrade(){
|
||||||
if [ -f "/usr/bin/archdi" ]; then
|
if [ -f "/usr/bin/archdi" ]; then
|
||||||
chkver=$version
|
#lastverurl=$lastverurl1
|
||||||
|
#chkver=$(curl $lastverurl)
|
||||||
|
|
||||||
|
#chkver=$version
|
||||||
#chkver=$(curl archdi.sourceforge.net/archdi/version)
|
#chkver=$(curl archdi.sourceforge.net/archdi/version)
|
||||||
if [ ! "$version" = "$chkver" ]; then
|
|
||||||
|
if [ ! "$version" = "$lastversion" ]; then
|
||||||
if (whiptail --backtitle "$apptitle" --yesno "New version found !\n\nInstall last version ?" 0 0) then
|
if (whiptail --backtitle "$apptitle" --yesno "New version found !\n\nInstall last version ?" 0 0) then
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget archdi.sourceforge.net/archdi
|
wget archdi.sourceforge.net/archdi
|
||||||
|
|
Loading…
Reference in a new issue