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