prise en charge du bouton annuler dans les menus
This commit is contained in:
parent
27c9b1dd89
commit
07daeaf257
13
borg-gui.sh
13
borg-gui.sh
@ -136,17 +136,28 @@ elif [ "$choixmenu" = "ms" ];then
|
|||||||
borg_archive=$(borg list --short $borg_repo | grep $filter | zenity --height=500 --list --title "Listes des archives" --column "Archive")
|
borg_archive=$(borg list --short $borg_repo | grep $filter | zenity --height=500 --list --title "Listes des archives" --column "Archive")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$borg_archive" = "" ];then
|
||||||
|
zenity --width=600 --info --text "Aucune archive choisie, retour au menu"
|
||||||
|
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>"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [ "$choixmenu" = "dm" ];then
|
elif [ "$choixmenu" = "dm" ];then
|
||||||
# Demonter une archive
|
# Demonter une archive
|
||||||
|
|
||||||
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
|
||||||
|
zenity --width=600 --info --text "Aucune option choisie, retour au menu"
|
||||||
|
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
|
||||||
|
|
||||||
elif [ "$choixmenu" = "ss" ];then
|
elif [ "$choixmenu" = "ss" ];then
|
||||||
# Supprimmer une archive
|
# Supprimmer une archive
|
||||||
@ -197,6 +208,6 @@ elif [ "$choixmenu" = "ap" ];then
|
|||||||
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
|
elif [ "$choixmenu" = "" ];then
|
||||||
zenity --width=600 --info --text="Aucun choix, retour au menu."
|
exit
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user