indentation du code

This commit is contained in:
Djan GICQUEL 2021-07-21 17:45:46 +02:00
parent 07daeaf257
commit 710bbe08b9
1 changed files with 17 additions and 20 deletions

View File

@ -92,8 +92,7 @@ TestBorgRepo
#################################################################################
# Gestion des options du menu
#################################################################################
while [ ! "$choixmenu" = "qu" ]
do
choixmenu=$(echo -e "\
cs\nCréer une archive\n\
ms\nMonter une archive\n\
@ -106,13 +105,16 @@ id\nInformation sur le dépôt\n\
ap\nAfficher le profil\n\
--\n------------------------------------------\n\
ed\nEspace disque utilisé : $(df -k --output=pcent $borg_repo | tail -n +2)\n\
qu\nQuitter\
" | zenity --list \
--height=400 --width=400 \
--title "BORG GUI : $nomsauvegarde" \
--cancel-label "Quitter" \
--hide-header --hide-column=1 --column "id" --column "choix")
if [ "$choixmenu" = "cs" ] ;then
if [ "$choixmenu" = "" ];then
elif [ "$choixmenu" = "cs" ] ;then
# Créer une archive
TestBorgRepo
@ -121,10 +123,10 @@ if [ "$choixmenu" = "cs" ] ;then
DossierPresent $borg_dir
if [ "$VarDossierPresent" != "false" ];then
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"
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"
fi
elif [ "$choixmenu" = "ms" ];then
@ -139,7 +141,6 @@ elif [ "$choixmenu" = "ms" ];then
if [ "$borg_archive" = "" ];then
zenity --width=600 --info --text "Aucune archive choisie, retour au menu"
else
mkdir $HOME/$borg_archive
borg mount $borg_repo::$borg_archive $HOME/$borg_archive | zenity --width=600 --progress --pulsate --auto-close
zenity --width=600 --info --text="La sauvegarde est disponible dans le dossier\n<tt>$HOME/$borg_archive</tt>"
@ -151,13 +152,13 @@ elif [ "$choixmenu" = "dm" ];then
ptnmontage=$(mount | grep borgfs | cut -d" " -f3 | zenity --width=500 --height=400 --list --title "Liste des points de montages" --column "Archive")
if [ "$ptnmontage" = "" ];then
zenity --width=600 --info --text "Aucune option choisie, retour au menu"
else
fusermount -u $ptnmontage | zenity --width=600 --progress --pulsate --auto-close
sleep 5 | zenity --width=600 --progress --pulsate --auto-close
rmdir $ptnmontage | zenity --width=600 --progress --pulsate --auto-close
fi
if [ "$ptnmontage" = "" ];then
zenity --width=600 --info --text "Aucune option choisie, retour au menu"
else
fusermount -u $ptnmontage | zenity --width=600 --progress --pulsate --auto-close
sleep 5 | zenity --width=600 --progress --pulsate --auto-close
rmdir $ptnmontage | zenity --width=600 --progress --pulsate --auto-close
fi
elif [ "$choixmenu" = "ss" ];then
# Supprimmer une archive
@ -206,8 +207,4 @@ elif [ "$choixmenu" = "ap" ];then
# Afficher le profil
zenity --width=600 --height=400 --info --text="<tt>$(cd $dossierprofil && cat $fichierprofil)</tt>"
elif [ "$choixmenu" = "" ];then
exit
fi
done