diff --git a/borg-gui.sh b/borg-gui.sh index b486f1c..3bb7eb0 100755 --- a/borg-gui.sh +++ b/borg-gui.sh @@ -50,21 +50,6 @@ DossierPresent () { fi } -SauvegardeBorg () { - DossierPresent $borg_repo - DossierPresent $borg_dir - - zenity --width=600 --height=500 --info --text="$(cd $dossierprofil && cat $fichierprofil)" - - espacedisqueutil=$(df -k --output=pcent $borg_repo | tail -n +2) - zenity --width=600 --notification --text "Espace disque utilisé\n\n $espacedisqueutil" - - borg create $borg_excludes $borg_compress $borg_repo::$borg_archive $borg_dir | zenity --width=600 --progress --pulsate --auto-close --title="Sauvegarde en cours..." - sync | zenity --width=600 --progress --pulsate --auto-close --title="Synchronisation des écritures..." - zenity --notification --text "Sauvegarde $nomsauvegarde terminée" - zenity --width=600 --info --text "Sauvegarde $nomsauvegarde terminée" -} - # Profils et tests ################################################################################# # si $1 n'est pas vide fichier de profil = $1 @@ -116,7 +101,19 @@ qu\nQuitter\ if [ "$choixmenu" = "cs" ] ;then TestBorgRepo - SauvegardeBorg + + DossierPresent $borg_repo + DossierPresent $borg_dir + + zenity --width=600 --height=500 --info --text="$(cd $dossierprofil && cat $fichierprofil)" + + espacedisqueutil=$(df -k --output=pcent $borg_repo | tail -n +2) + zenity --width=600 --notification --text "Espace disque utilisé\n\n $espacedisqueutil" + + borg create $borg_excludes $borg_compress $borg_repo::$borg_archive $borg_dir | zenity --width=600 --progress --pulsate --auto-close --title="Sauvegarde en cours..." + sync | zenity --width=600 --progress --pulsate --auto-close --title="Synchronisation des écritures..." + zenity --notification --text "Sauvegarde $nomsauvegarde terminée" + zenity --width=600 --info --text "Sauvegarde $nomsauvegarde terminée" elif [ "$choixmenu" = "ed" ] ;then espacedisqueutil=$(df -k --output=pcent $borg_repo | tail -n +2)