Nouvelle version du selecteur de profils
This commit is contained in:
parent
d3681acba6
commit
79e1c4c520
29
borg-gui.sh
29
borg-gui.sh
@ -72,8 +72,13 @@ if [ ! $1 = "" ]; then
|
|||||||
fichierprofil="$1"
|
fichierprofil="$1"
|
||||||
. "$1"
|
. "$1"
|
||||||
else
|
else
|
||||||
fichierprofil=$(ls -1 "$dossierprofil"*.conf | zenity $H $W $iconborg --list --title "Liste des profils" --text "Choisir un profil dans la liste" --hide-header --column "profil")
|
cd $dossierprofil
|
||||||
. $fichierprofil
|
fichierprofil=$(ls -1 *.conf | cut -d. -f1 | \
|
||||||
|
zenity $W $H $iconborg --list \
|
||||||
|
--title "Liste des profils" \
|
||||||
|
--text "Choisir un profil dans la liste" \
|
||||||
|
--column "Fichier de profil"\
|
||||||
|
) && . "$dossierprofil"/"$fichierprofil".conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$fichierprofil" = "" ]; then
|
if [ "$fichierprofil" = "" ]; then
|
||||||
@ -134,22 +139,26 @@ qu\nQUITTER\
|
|||||||
|
|
||||||
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 $H $iconborg --list --title "Listes des archives" --column "Archive")
|
BorgList="borg list --short $borg_repo"
|
||||||
else
|
else
|
||||||
borg_archive=$(borg list --short $borg_repo | grep $filter | zenity $H $iconborg --list --title "Listes des archives" --column "Archive")
|
BorgList="borg list --short $borg_repo | grep $filter"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir $HOME/$borg_archive
|
echo $BorgList
|
||||||
borg mount $borg_repo::$borg_archive $HOME/$borg_archive | ZenityPulsate
|
#borg_archive=$($BorgList | zenity $H $iconborg --list --title "Listes des archives" --column "Archive")
|
||||||
zenity $W --info --text="La sauvegarde est disponible dans le dossier\n<tt>$HOME/$borg_archive</tt>"
|
|
||||||
|
#if [ ! "$borg_archive" = "" ];then
|
||||||
|
#mkdir $HOME/$borg_archive
|
||||||
|
#borg mount $borg_repo::$borg_archive $HOME/$borg_archive | ZenityPulsate
|
||||||
|
#zenity $W --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 $H $iconborg --list --title "Liste des points de montages" --column "Archive")
|
ptnmontage=$(mount | grep borgfs | cut -d" " -f3 | zenity $W $H $iconborg --list --title "Liste des points de montages" --column "Archive")
|
||||||
if [ "$ptnmontage" != "" ];then
|
if [ ! "$ptnmontage" = "" ];then
|
||||||
fusermount -u $ptnmontage | ZenityPulsate
|
fusermount -u $ptnmontage | ZenityPulsate
|
||||||
sleep 2 | ZenityPulsate
|
sleep 2 | ZenityPulsate
|
||||||
rmdir $ptnmontage | ZenityPulsate
|
rmdir $ptnmontage | ZenityPulsate
|
||||||
|
Loading…
Reference in New Issue
Block a user