Modification du menu

ne pas autoriser à quitter si des archives sont toujours montées
This commit is contained in:
Djan GICQUEL 2021-11-14 20:04:58 +01:00
parent 5e32b11cde
commit 3c055025af
1 changed files with 9 additions and 1 deletions

View File

@ -110,7 +110,7 @@ TestBorgRepo
# MENU PRINCIPAL Gestion des options du menu
#################################################################################
while [ ! "$choixmenu" = "qu" ];do
while [ ! "$quitter" = "yes" ];do
# si aucune archive n'est montée, cacher l'entrée de menu «Démonter une archive»
if [ "$(mount | grep borgfs)" != "" ];then
@ -211,5 +211,13 @@ qu\nQUITTER\
# Afficher le profil
zenity $W $H --info --text="<tt>$(cd $dossierprofil && cat "$fichierprofil".conf)</tt>"
elif [ "$choixmenu" = "qu" ];then
if [ "$(mount | grep borgfs)" = "" ];then
quitter="yes"
else
zenity $W --warning --text="Une ou des archives sont montées.\nDémontez-le afin de laisser le dépôt dans un état cohérent."
fi
fi
done