ajout d'une entrée de menu "démonter toutes les archives"

This commit is contained in:
Djan GICQUEL 2022-02-03 22:17:46 +01:00
parent 3c055025af
commit 94e68f3a94
1 changed files with 9 additions and 1 deletions

View File

@ -114,7 +114,7 @@ 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
MenuDemonter="dm\nDemonter une archive\n"
MenuDemonter="dm\nDemonter une archive\ndmt\nDémonter toutes les archives\n"
else
MenuDemonter=""
fi
@ -178,6 +178,14 @@ qu\nQUITTER\
rmdir $ptnmontage | ZenityPulsate
fi
elif [ "$choixmenu" = "dmt" ];then
# Demonter toutes les archives
while [ $(mount | grep borgfs | cut -d" " -f3 | head -n 1) ];do
ptnmontage="$(mount | grep borgfs | cut -d" " -f3 | head -n 1)"
notify-send -i $HOME/.icons/borg.svg "borg-zenity" "Démontage de $ptnmontage"
fusermount -uz $ptnmontage && sleep 2 && rmdir $ptnmontage
done
elif [ "$choixmenu" = "ss" ];then
# Supprimmer une archive