function to test if zenity is installed

removing confirmation for --delete
This commit is contained in:
Djan GICQUEL 2022-04-19 18:34:54 +02:00
parent bbc3d904cf
commit d7d2f26b1c

View File

@ -1,6 +1,8 @@
#! /bin/bash
which zenity || echo "Zenity n'est pas installé, installer zenity et relancer le script." exit
if [ ! $(which zenity) ];then
echo "Zenity n'est pas installé, installer zenity et relancer le script.";exit
fi
#---------------------------------------------------------
# Variables
@ -26,15 +28,13 @@ wget --quiet $url -O $binarypath
#---------------------------------------------------------
if [ "$1" = "--delete" ]; then
echo "Suppression des fichiers youtube-dl"
echo "Une confirmation sera demandé pour chaque fichiers"
echo ""
f_TouchePourContinuer
rm -vi $HOME/.local/share/applications/youtube-dl-update.desktop
rm -vi $HOME/.local/share/applications/youtube-dl-gui.desktop
rm -vi $HOME/bin/youtube-dl-pseudogui.sh
rm -vi $HOME/bin/youtube-dl-update.sh
rm -vi $binarypath
rm -v $HOME/.local/share/applications/youtube-dl-update.desktop
rm -v $HOME/.local/share/applications/youtube-dl-gui.desktop
rm -v $HOME/bin/youtube-dl-pseudogui.sh
rm -v $HOME/bin/youtube-dl-update.sh
rm -v $binarypath
exit
fi