ajout du menu «Modifier un profil»

This commit is contained in:
Djan GICQUEL 2022-07-14 15:05:52 +02:00
parent 2b35ce5797
commit ef5e46fa3a
1 changed files with 7 additions and 1 deletions

View File

@ -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="<tt>$(cd "$dossierprofil" && cat "$fichierprofil")</tt>"
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