prise en charge du bouton annuler dans les menus
This commit is contained in:
parent
27c9b1dd89
commit
07daeaf257
35
borg-gui.sh
35
borg-gui.sh
@ -130,23 +130,34 @@ if [ "$choixmenu" = "cs" ] ;then
|
|||||||
elif [ "$choixmenu" = "ms" ];then
|
elif [ "$choixmenu" = "ms" ];then
|
||||||
# Monter une archive
|
# Monter une archive
|
||||||
|
|
||||||
if [ "$filter" = "" ];then
|
if [ "$filter" = "" ];then
|
||||||
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
|
borg_archive=$(borg list --short $borg_repo | zenity --height=500 --list --title "Listes des archives" --column "Archive")
|
||||||
else
|
else
|
||||||
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
|
||||||
|
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>"
|
||||||
|
fi
|
||||||
|
|
||||||
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>"
|
|
||||||
|
|
||||||
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")
|
||||||
fusermount -u $ptnmontage | zenity --width=600 --progress --pulsate --auto-close
|
|
||||||
sleep 5 | zenity --width=600 --progress --pulsate --auto-close
|
if [ "$ptnmontage" = "" ];then
|
||||||
rmdir $ptnmontage | zenity --width=600 --progress --pulsate --auto-close
|
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
|
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