From 6b8395a81bca97950d79b5bf2cb2aa323c611249 Mon Sep 17 00:00:00 2001
From: Djan GICQUEL <>
Date: Wed, 10 Mar 2021 19:47:29 +0100
Subject: [PATCH] =?UTF-8?q?item=20de=20menu=20agr=C3=A9able=20=C3=A0=20lib?=
=?UTF-8?q?re=20assignation=20de=20variables=20courtes=20pour=20le=20menu?=
=?UTF-8?q?=20cacher=20la=20premi=C3=A8re=20collonne?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
borg-gui.sh | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/borg-gui.sh b/borg-gui.sh
index c4b0161..e33005b 100755
--- a/borg-gui.sh
+++ b/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="$info"
-elif [ "$choixmenu" = "info_depot" ];then
+elif [ "$choixmenu" = "id" ];then
info=$(borg info $borg_repo)
zenity --width=600 --info --text="$info"
-elif [ "$choixmenu" = "afficher_profil" ];then
+elif [ "$choixmenu" = "ap" ];then
info=$(cd $dossierprofil && cat $fichierprofil)
zenity --width=600 --height=400 --info --text="$info"