simplification des if supression des dialogues «Aucune archive choisie,
retour au menu»
This commit is contained in:
parent
955e74f069
commit
5619b57f0f
16
borg-gui.sh
16
borg-gui.sh
@ -246,9 +246,7 @@ fi
|
|||||||
elif [ "$choixmenu" = "ss" ];then
|
elif [ "$choixmenu" = "ss" ];then
|
||||||
# Supprimer une archive
|
# Supprimer une archive
|
||||||
BorgFilter
|
BorgFilter
|
||||||
if [ "$Borg_Archive" = "" ];then
|
if [ ! "$Borg_Archive" = "" ];then
|
||||||
zenity $W --info --text "Aucune archive choisie, retour au menu"
|
|
||||||
else
|
|
||||||
borg delete "$borg_repo"::"$Borg_Archive" | ZenityPulsate
|
borg delete "$borg_repo"::"$Borg_Archive" | ZenityPulsate
|
||||||
zenity $W --info --text="Suppresion de l'archive $Borg_Archive terminée"
|
zenity $W --info --text="Suppresion de l'archive $Borg_Archive terminée"
|
||||||
fi
|
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")
|
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
|
fi
|
||||||
|
|
||||||
if [ "$Borg_Archive" = "" ];then
|
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
|
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)"
|
zenity $W --info --text="Suppression des archives terminée.\nArchives supprimées : $(echo "$Borg_Archive" | sed s/\|/\ /g)"
|
||||||
fi
|
fi
|
||||||
@ -273,9 +269,7 @@ fi
|
|||||||
# renommer une archive
|
# renommer une archive
|
||||||
BorgFilter
|
BorgFilter
|
||||||
|
|
||||||
if [ "$Borg_Archive" = "" ];then
|
if [ ! "$Borg_Archive" = "" ];then
|
||||||
zenity $W --info --text "Aucune archive choisie, retour au menu"
|
|
||||||
else
|
|
||||||
borg_nouveaunom=$(zenity $W --entry --text "Nouveau nom" --entry-text="$Borg_Archive")
|
borg_nouveaunom=$(zenity $W --entry --text "Nouveau nom" --entry-text="$Borg_Archive")
|
||||||
borg rename "$borg_repo"::"$Borg_Archive" "$borg_nouveaunom" | ZenityPulsate
|
borg rename "$borg_repo"::"$Borg_Archive" "$borg_nouveaunom" | ZenityPulsate
|
||||||
fi
|
fi
|
||||||
@ -284,9 +278,7 @@ fi
|
|||||||
elif [ "$choixmenu" = "is" ];then
|
elif [ "$choixmenu" = "is" ];then
|
||||||
# Information archive
|
# Information archive
|
||||||
BorgFilter
|
BorgFilter
|
||||||
if [ "$Borg_Archive" = "" ];then
|
if [ ! "$Borg_Archive" = "" ];then
|
||||||
zenity $W --info --text "Aucune archive choisie, retour au menu"
|
|
||||||
else
|
|
||||||
zenity $W --info --text="<tt>$(borg info "$borg_repo"::"$Borg_Archive")</tt>" | ZenityPulsate
|
zenity $W --info --text="<tt>$(borg info "$borg_repo"::"$Borg_Archive")</tt>" | ZenityPulsate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user