simplification des if supression des dialogues «Aucune archive choisie,

retour au menu»
This commit is contained in:
Djan GICQUEL 2022-07-23 12:31:25 +02:00
parent 955e74f069
commit 5619b57f0f
1 changed files with 4 additions and 12 deletions

View File

@ -246,9 +246,7 @@ fi
elif [ "$choixmenu" = "ss" ];then
# Supprimer une archive
BorgFilter
if [ "$Borg_Archive" = "" ];then
zenity $W --info --text "Aucune archive choisie, retour au menu"
else
if [ ! "$Borg_Archive" = "" ];then
borg delete "$borg_repo"::"$Borg_Archive" | ZenityPulsate
zenity $W --info --text="Suppresion de l'archive $Borg_Archive terminée"
fi
@ -262,9 +260,7 @@ fi
Borg_Archive=$(borg list --short "$borg_repo" | grep "$filter" | sed s/^/S\\n/g | zenity $H $W $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
if [ ! "$Borg_Archive" = "" ];then
borg delete "$borg_repo"::$(echo "$Borg_Archive" | sed s/\|/\ /g) | ZenityPulsate
zenity $W --info --text="Suppression des archives terminée.\nArchives supprimées : $(echo "$Borg_Archive" | sed s/\|/\ /g)"
fi
@ -273,9 +269,7 @@ fi
# renommer une archive
BorgFilter
if [ "$Borg_Archive" = "" ];then
zenity $W --info --text "Aucune archive choisie, retour au menu"
else
if [ ! "$Borg_Archive" = "" ];then
borg_nouveaunom=$(zenity $W --entry --text "Nouveau nom" --entry-text="$Borg_Archive")
borg rename "$borg_repo"::"$Borg_Archive" "$borg_nouveaunom" | ZenityPulsate
fi
@ -284,9 +278,7 @@ fi
elif [ "$choixmenu" = "is" ];then
# Information archive
BorgFilter
if [ "$Borg_Archive" = "" ];then
zenity $W --info --text "Aucune archive choisie, retour au menu"
else
if [ ! "$Borg_Archive" = "" ];then
zenity $W --info --text="<tt>$(borg info "$borg_repo"::"$Borg_Archive")</tt>" | ZenityPulsate
fi