ajout d'un if en cas d'absence de choix pour info et suppression archivex

This commit is contained in:
Djan GICQUEL 2021-06-27 19:50:09 +02:00
parent 911395701f
commit 0c3332fd2e

View File

@ -151,14 +151,25 @@ elif [ "$choixmenu" = "ss" ];then
# Supprimmer une archive
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
borg delete $borg_repo::$borg_archive | zenity --width=600 --progress --pulsate --auto-close
zenity --width=600 --info --text="Suppresion de l'archive $borg_archive terminée"
if [ "$borg_archive" = "" ];then
zenity --width=600 --info --text "Aucune archive choisie, retour au menu"
else
borg delete $borg_repo::$borg_archive | zenity --width=600 --progress --pulsate --auto-close
zenity --width=600 --info --text="Suppresion de l'archive $borg_archive terminée"
fi
elif [ "$choixmenu" = "is" ];then
# Information archive
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
zenity --width=600 --info --text="<tt>$(borg info $borg_repo::$borg_archive)</tt>" | zenity --width=600 --progress --pulsate --auto-close
if [ "$borg_archive" = "" ];then
zenity --width=600 --info --text "Aucune archive choisie, retour au menu"
else
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
zenity --width=600 --info --text="<tt>$(borg info $borg_repo::$borg_archive)</tt>" | zenity --width=600 --progress --pulsate --auto-close
fi
elif [ "$choixmenu" = "id" ];then
# Information sur le dépôt