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