Add jsDelivr CDN source and "--noconfirm" option

This commit is contained in:
TheInterestingSoul 2020-10-07 14:21:36 +08:00 committed by GitHub
parent fa7e6eb264
commit 16ef0373d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

14
archdi
View file

@ -18,15 +18,19 @@ cachedir=~/.cache/archdi
lastverurl1=http://archdi.sourceforge.net/version lastverurl1=http://archdi.sourceforge.net/version
lastverurl2=https://raw.githubusercontent.com/MatMoul/archdi/master/version lastverurl2=https://raw.githubusercontent.com/MatMoul/archdi/master/version
lastverurl3=https://cdn.jsdelivr.net/gh/MatMoul/archdi@master/version
binurl1=archdi.sourceforge.net/archdi binurl1=archdi.sourceforge.net/archdi
binurl2=matmoul.github.io/archdi binurl2=matmoul.github.io/archdi
binurl3=https://cdn.jsdelivr.net/gh/MatMoul/archdi@master/archdi
liburl1=http://archdi.sourceforge.net/archdi-lib liburl1=http://archdi.sourceforge.net/archdi-lib
liburl2=https://raw.githubusercontent.com/MatMoul/archdi-pkg/master/lib liburl2=https://raw.githubusercontent.com/MatMoul/archdi-pkg/master/lib
liburl3=https://cdn.jsdelivr.net/gh/MatMoul/archdi-pkg@master/lib
pkgurl1=http://archdi.sourceforge.net/archdi-pkg pkgurl1=http://archdi.sourceforge.net/archdi-pkg
pkgurl2=https://raw.githubusercontent.com/MatMoul/archdi-pkg/master/pkg.tar pkgurl2=https://raw.githubusercontent.com/MatMoul/archdi-pkg/master/pkg.tar
pkgurl3=https://cdn.jsdelivr.net/gh/MatMoul/archdi-pkg@master/pkg.tar
help(){ help(){
@ -120,10 +124,18 @@ dependencies(){
binurl=$binurl2 binurl=$binurl2
liburl=$liburl2 liburl=$liburl2
pkgurl=$pkgurl2 pkgurl=$pkgurl2
else
lastverurl=$lastverurl3
lastver=$(curl $lastverurl)
if [ "$?" = "0" ] && [ "${#lastver}" = "19" ]; then
binurl=$binurl3
liburl=$liburl3
pkgurl=$pkgurl3
else else
exit 1 exit 1
fi fi
fi fi
fi
echo "" echo ""
echo "Checking $apptitle dependencies :" echo "Checking $apptitle dependencies :"
echo "" echo ""
@ -146,7 +158,7 @@ dependencies(){
case "$choice" in case "$choice" in
n|N ) exit 1;; n|N ) exit 1;;
esac esac
pacman -S --needed wget libnewt pacman -S --needed --noconfirm wget libnewt
fi fi
echo "" echo ""
echo "Checking bin version..." echo "Checking bin version..."