From aedbadd83428b1f9d6b6bc5d9d217405f1c98c09 Mon Sep 17 00:00:00 2001 From: Djan GICQUEL <> Date: Thu, 21 Jul 2022 21:22:04 +0200 Subject: [PATCH] =?UTF-8?q?=C3=A9chappement=20des=20variables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- borg-gui.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/borg-gui.sh b/borg-gui.sh index fd2ced7..6b8769d 100755 --- a/borg-gui.sh +++ b/borg-gui.sh @@ -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="$(borg info $borg_repo::$Borg_Archive)" | ZenityPulsate + zenity $W --info --text="$(borg info "$borg_repo"::"$Borg_Archive")" | 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="$(borg info $borg_repo)" | ZenityPulsate + zenity $W --info --text="$(borg info "$borg_repo")" | 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