echappement des variables

This commit is contained in:
Djan GICQUEL 2022-06-23 17:48:27 +02:00
parent 13d97442bf
commit 7a55bb867d
1 changed files with 6 additions and 7 deletions

View File

@ -2,6 +2,8 @@
# Fonctions et variables
###########################################################
W="--width=600"
H="--height=500"
ZenityPulsate () {
zenity $W --window-icon=$HOME/.icons/borg.svg --progress --pulsate --auto-close
@ -30,11 +32,8 @@ if [ -d "lock.exclusive" ]; then
fi
}
W="--width=600"
H="--height=500"
dossierprofil="$HOME/.config/borg/profils-borg-zenity/"
mkdir -p $dossierprofil && cd $dossierprofil
mkdir -p "$dossierprofil" && cd "$dossierprofil"
# Affichage du menu
###########################################################
@ -54,7 +53,7 @@ ap\nAfficher les profils\
if [ "$choixmenu" = "cp" ];then
borg_repo=$(zenity --file-selection --directory)
if [ ! -z "$(ls -A $borg_repo)" ]; then
if [ ! -z "$(ls -A "$borg_repo")" ]; then
zenity $W --error --text="Erreur, le dossier n'est pas vide."
exit
fi
@ -67,12 +66,12 @@ if [ "$?" = "0" ];then
Veuillez à sauvegarder ce dossier dans un endroit sûr.\n\n\
Si cette clé ne peut être lue les données ne seront pas récupérables.\n\n\
Notez qu'il n'existe aucun mécanisme de récupération de clé."
borg init $borg_repo | ZenityPulsate
borg init "$borg_repo" | ZenityPulsate
zenity $W --info --text "Un nouveau dépôt chiffré a été généré dans <tt>$borg_repo</tt>"
elif [ "$?" = "1" ];then
zenity $W --warning --text \
"Je comprends qu'en ne sécurisant pas mon dépôt les données qu'il contient seront librement accessible par toute personne ayant accès aux fichiers du dépôt."
borg init --encryption none $borg_repo | ZenityPulsate
borg init --encryption none "$borg_repo" | ZenityPulsate
zenity $W --info --text "Un nouveau dépôt en clair a été généré dans <tt>$borg_repo</tt>"
fi