From 8d65ffea7a7febd4eddc4946d1e245d96f0ece2e Mon Sep 17 00:00:00 2001 From: Djan GICQUEL <> Date: Fri, 11 Feb 2022 21:48:40 +0100 Subject: [PATCH] =?UTF-8?q?=C3=A9l=C3=A9ment=20de=20menu=20fonctionnel=20:?= =?UTF-8?q?=20suppression=20des=20archives?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- borg-gui.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/borg-gui.sh b/borg-gui.sh index 7b80cb6..1ac5a9a 100755 --- a/borg-gui.sh +++ b/borg-gui.sh @@ -133,6 +133,7 @@ cs\nCréer l'archive : $(echo $borg_archive)\n\ ms\nMonter une archive\n\ $(echo $MenuDemonter)\ ss\nSupprimmer une archive\n\ +sss\nSupprimmer des archives\n\ is\nInformation archive\n\ fi\nFiltre : "$filter"\n\ --\n------------------------------------------\n\ @@ -206,6 +207,22 @@ qu\nQUITTER\ zenity $W --info --text="Suppresion de l'archive $Borg_Archive terminée" fi + elif [ "$choixmenu" = "sss" ];then + # Supprimmer des archives + + if [ "$filter" = "" ];then + Borg_Archive=$(borg list --short $borg_repo | sed s/^/\\n/g | zenity $H $iconborg --list --checklist --title "Listes des archives" --column "Sel" --column "Archive") + else + Borg_Archive=$(borg list --short $borg_repo | grep $filter | sed s/^/S\\n/g | zenity $H $iconborg --list --checklist --title "Listes des archives" --column "S" --column "Archive") + fi + + if [ "$Borg_Archive" = "" ];then + zenity $W --info --text "Aucune archive choisie, retour au menu" + else + borg delete $borg_repo::$(echo "$Borg_Archive" | sed s/\|/\ /g) | ZenityPulsate + zenity $W --info --text="Suppression des archives terminée.\nArchives supprimmées : $(echo "$Borg_Archive" | sed s/\|/\ /g)" + fi + elif [ "$choixmenu" = "is" ];then # Information archive