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