From ef5e46fa3a4d31645de7e8a8eab0eec93fd8c4bf Mon Sep 17 00:00:00 2001 From: Djan GICQUEL <> Date: Thu, 14 Jul 2022 15:05:52 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20du=20menu=20=C2=ABModifier=20un=20profi?= =?UTF-8?q?l=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- profile-manager.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/profile-manager.sh b/profile-manager.sh index a67eb24..52deb6e 100755 --- a/profile-manager.sh +++ b/profile-manager.sh @@ -34,7 +34,8 @@ mkdir -p "$dossierprofil" && cd "$dossierprofil" || exit choixmenu=$(echo -e "\ cp\nCréer un nouveau profil/dépôt\n\ ajd\nCréer un nouveau profil et le lier à un dépôt existant\n\ -ap\nAfficher les profils\ +ap\nAfficher les profils\n\ +mp\nModifier un profil (connaissance en ligne de commande borg requise)\ " | zenity $H $W --window-icon=borg --list --column "id" --column "choix" --hide-column=1 --hide-header) # Gestion des choix du menu @@ -132,6 +133,11 @@ if [ "$fichierprofil" != "" ];then zenity $W $H --info --text="$(cd "$dossierprofil" && cat "$fichierprofil")" fi +elif [ "$choixmenu" = "mp" ];then +fichierprofil=$(ls -1 *.conf | zenity $H $W --window-icon=borg --list --title "Liste des profils" --text "Choisir un profil dans la liste" --hide-header --column "profil") +zenity $W $H --text-info --editable --title="profil $fichierprofil" --filename "$fichierprofil" > "$dossierprofil"/"$fichierprofil".tmp +mv "$dossierprofil"/"$fichierprofil".tmp "$dossierprofil"/"$fichierprofil" + elif [ "$choixmenu" = "" ];then exit fi