renommer : notification + gestion annulation

This commit is contained in:
Djan GICQUEL 2022-08-10 08:23:30 +02:00
parent 04136dc7ef
commit f7d107eb96
1 changed files with 10 additions and 3 deletions

View File

@ -234,6 +234,7 @@ fi
sleep 2 | ZenityPulsate
rmdir "$ptnmontage" | ZenityPulsate
fi
zenity --notification $iconborg --text="Démontage de $ptnmontage"
elif [ "$choixmenu" = "dmt" ];then
# Démonter toutes les archives
@ -271,10 +272,16 @@ fi
BorgFilter
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
borg_nouveaunom=$(zenity $W --entry --text "Nouveau nom" --entry-text="$Borg_Archive")
if [ "$borg_nouveaunom" = "$Borg_Archive" ];then
zenity --notification $iconborg --text="Renommage annulé"
elif [ "$borg_nouveaunom" = "" ];then
zenity --notification $iconborg --text="Renommage annulé"
elif [ "$Borg_Archive" != "$borg_nouveaunom" ];then
borg rename "$borg_repo"::"$Borg_Archive" "$borg_nouveaunom" | ZenityPulsate
zenity --notification $iconborg --text="Renommage terminé\n"$Borg_Archive" -> "$borg_nouveaunom""
fi
fi
elif [ "$choixmenu" = "is" ];then
# Information archive