item de menu agréable à libre
assignation de variables courtes pour le menu cacher la première collonne
This commit is contained in:
parent
f53cdbd2b8
commit
6b8395a81b
37
borg-gui.sh
37
borg-gui.sh
@ -94,50 +94,53 @@ TestBorgRepo
|
||||
#################################################################################
|
||||
# Gestion des options du menu
|
||||
#################################################################################
|
||||
while [ ! "$choixmenu" = "QUITTER" ]
|
||||
while [ ! "$choixmenu" = "qu" ]
|
||||
do
|
||||
choixmenu=$(echo -e "\
|
||||
creer_sauvegarde\n\
|
||||
monter_sauvegarde\n\
|
||||
demonter_sauvegarde\n\
|
||||
supprimmer_sauvegarde\n\
|
||||
info_sauvegarde\n\
|
||||
info_depot\n\
|
||||
afficher_profil\n\
|
||||
QUITTER\
|
||||
" | zenity --list --height=400 --width=400 --title "BORG GUI" --column "Nom : $nomsauvegarde")
|
||||
cs\nCréer une archive\n\
|
||||
ms\nMonter une archive\n\
|
||||
dm\nDemonter une archive\n\
|
||||
ss\nSupprimmer une archive\n\
|
||||
is\nInformation archive\n\
|
||||
id\nInformation sur le dépôt\n\
|
||||
ap\nAfficher le profil\n\
|
||||
qu\nQuitter\
|
||||
" | zenity --list \
|
||||
--height=400 --width=400 \
|
||||
--title "BORG GUI : $nomsauvegarde" \
|
||||
--hide-header --hide-column=1 --column "id" --column "choix")
|
||||
|
||||
if [ "$choixmenu" = "creer_sauvegarde" ] ;then
|
||||
if [ "$choixmenu" = "cs" ] ;then
|
||||
TestBorgRepo
|
||||
SauvegardeBorg
|
||||
|
||||
elif [ "$choixmenu" = "monter_sauvegarde" ];then
|
||||
elif [ "$choixmenu" = "ms" ];then
|
||||
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
|
||||
mkdir $HOME/$borg_archive
|
||||
borg mount $borg_repo::$borg_archive $HOME/$borg_archive
|
||||
zenity --width=400 --info --text="La sauvegarde est disponible dans le dossier\n$HOME/$borg_archive"
|
||||
|
||||
elif [ "$choixmenu" = "demonter_sauvegarde" ];then
|
||||
elif [ "$choixmenu" = "dm" ];then
|
||||
ptnmontage=$(mount | grep borgfs | cut -d" " -f3 | zenity --width=500 --height=400 --list --title "Liste des points de montages" --column "")
|
||||
fusermount -u $ptnmontage
|
||||
sleep 5
|
||||
rmdir $ptnmontage
|
||||
|
||||
elif [ "$choixmenu" = "supprimmer_sauvegarde" ];then
|
||||
elif [ "$choixmenu" = "ss" ];then
|
||||
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=400 --progress --pulsate --auto-close --title="Suppression en cours..."
|
||||
zenity --width=200 --info --text="Suppresion terminée"
|
||||
|
||||
elif [ "$choixmenu" = "info_sauvegarde" ];then
|
||||
elif [ "$choixmenu" = "is" ];then
|
||||
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
|
||||
info=$(borg info $borg_repo::$borg_archive)
|
||||
zenity --width=600 --info --text="<tt>$info</tt>"
|
||||
|
||||
elif [ "$choixmenu" = "info_depot" ];then
|
||||
elif [ "$choixmenu" = "id" ];then
|
||||
info=$(borg info $borg_repo)
|
||||
zenity --width=600 --info --text="<tt>$info</tt>"
|
||||
|
||||
elif [ "$choixmenu" = "afficher_profil" ];then
|
||||
elif [ "$choixmenu" = "ap" ];then
|
||||
info=$(cd $dossierprofil && cat $fichierprofil)
|
||||
zenity --width=600 --height=400 --info --text="<tt>$info</tt>"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user