échappement des variables

This commit is contained in:
Djan GICQUEL 2022-07-21 21:22:04 +02:00
parent 7a8ba97678
commit aedbadd834

View File

@ -193,12 +193,12 @@ fi
DossierPresent "$borg_repo"
DossierPresent "$borg_dir" && cd "$borg_dir"
if borg list --short "$borg_repo" | grep $borg_archive ;then
if borg list --short "$borg_repo" | grep "$borg_archive" ;then
zenity --warning $W $iconborg --text "L'archive existe déjà."
else
if [ "$VarDossierPresent" != "false" ];then
log="/tmp/borg-zenity-$borg_archive.log"
borg create $borg_excludes $borg_compress "$borg_repo"::"$borg_archive" ./ 2> "$log" | ZenityPulsate
borg create "$borg_excludes" "$borg_compress" "$borg_repo"::"$borg_archive" ./ 2>> "$log" | ZenityPulsate
chmod 777 "$log"
if [ $(wc -c "$log" | cut -f1 -d " ") -gt 1 ] ;then
zenity $W --error --title "borg-zenity erreur" --text "$(cat $log)"
@ -234,7 +234,7 @@ fi
while [ $(mount | grep borgfs | cut -d" " -f3 | head -n 1) ];do
ptnmontage="$(mount | grep borgfs | cut -d" " -f3 | head -n 1)"
zenity --notification $iconborg --text="Démontage de $ptnmontage"
fusermount -uz $ptnmontage && sleep 2 && rmdir $ptnmontage
fusermount -uz "$ptnmontage" && sleep 2 && rmdir "$ptnmontage"
done
@ -282,7 +282,7 @@ fi
if [ "$Borg_Archive" = "" ];then
zenity $W --info --text "Aucune archive choisie, retour au menu"
else
zenity $W --info --text="<tt>$(borg info $borg_repo::$Borg_Archive)</tt>" | ZenityPulsate
zenity $W --info --text="<tt>$(borg info "$borg_repo"::"$Borg_Archive")</tt>" | ZenityPulsate
fi
elif [ "$choixmenu" = "fi" ];then
@ -291,7 +291,7 @@ fi
elif [ "$choixmenu" = "id" ];then
# Information sur le dépôt
zenity $W --info --text="<tt>$(borg info $borg_repo)</tt>" | ZenityPulsate
zenity $W --info --text="<tt>$(borg info "$borg_repo")</tt>" | ZenityPulsate
elif [ "$choixmenu" = "ap" ];then
# Afficher le profil
@ -304,6 +304,5 @@ fi
else
zenity $W --warning --text="Une ou des archives sont montées.\nDémontez-le afin de laisser le dépôt dans un état cohérent."
fi
fi
done