whiptail broken, switching to dialog

This commit is contained in:
MatMoul 2022-11-10 21:30:45 +01:00
parent d10dbb62dc
commit 804203c2e0

16
archdi
View file

@ -143,16 +143,10 @@ dependencies(){
echo "" echo ""
echo "Checking $apptitle dependencies :" echo "Checking $apptitle dependencies :"
echo "" echo ""
if [ -e /usr/bin/wget ]; then if [ -e /usr/bin/dialog ]; then
echo "wget : installed" echo "dialog : installed"
else else
echo "wget : not installed" echo "dialog : not installed"
needinstall="true"
fi
if [ -e /usr/bin/whiptail ]; then
echo "libnewt : installed"
else
echo "libnewt : not installed"
needinstall="true" needinstall="true"
fi fi
if [ "$needinstall" = "true" ]; then if [ "$needinstall" = "true" ]; then
@ -162,7 +156,7 @@ dependencies(){
case "$choice" in case "$choice" in
n|N ) exit 1;; n|N ) exit 1;;
esac esac
pacman -S --needed --noconfirm wget libnewt pacman -S --needed --noconfirm dialog
fi fi
echo "" echo ""
echo "Checking bin version..." echo "Checking bin version..."
@ -174,7 +168,7 @@ chkupgrade(){
if [ ! "$version" = "$lastver" ]; then if [ ! "$version" = "$lastver" ]; 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 $binurl curl -LO $binurl
sh archdi -i sh archdi -i
exit 0 exit 0
fi fi