ajout du code pour gérer Debian
This commit is contained in:
parent
575cd9eed2
commit
eaa29a8426
46
install.sh
46
install.sh
@ -1,16 +1,40 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
. testdistro.sh
|
||||||
|
|
||||||
# Borg zenity install and update
|
# Borg zenity install and update
|
||||||
which zenity
|
if [[ "$OS" =~ "Fedora" ]];then
|
||||||
if [ "$?" != "0" ]; then
|
echo "Fedora detecté"
|
||||||
bash testdistro.sh || exit
|
sudo dnf install borgbackup zenity
|
||||||
|
|
||||||
|
elif [[ "$OS" =~ "Debian" ]];then
|
||||||
|
echo "Debian detecté"
|
||||||
|
su -c "apt-get -y install borgbackup zenity"
|
||||||
|
|
||||||
|
elif [[ "$OS" =~ "Ubuntu" ]];then
|
||||||
|
echo "Ubuntu detecté"
|
||||||
|
sudo apt-get install -y borgbackup zenity
|
||||||
|
|
||||||
|
elif [[ "$OS" =~ "Linux Mint" ]];then
|
||||||
|
echo "Linux Mint detecté"
|
||||||
|
sudo apt-get install -y borgbackup zenity
|
||||||
|
|
||||||
|
elif [[ "$OS" =~ "Manjaro" ]];then
|
||||||
|
echo "Manjaro detecté"
|
||||||
|
sudo pacman -Sy borgbackup zenity
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which borg
|
if [[ "$OS" =~ "Debian" ]];then
|
||||||
if [ "$?" != "0" ]; then
|
su -c "mkdir -vp /opt/borg-zenity"
|
||||||
bash testdistro.sh || exit
|
su -c "cp -fv icons/borg.svg /usr/share/icons/"
|
||||||
fi
|
su -c "cp -fv icons/borgzenity-profils.svg /usr/share/icons/"
|
||||||
|
su -c "cp -fv icons/borgzenity-sauvegarde.svg /usr/share/icons/"
|
||||||
|
su -c "cp -fv borg-zenity-sauvegarde.desktop /usr/share/applications/"
|
||||||
|
su -c "cp -fv borg-zenity-gestprofils.desktop /usr/share/applications/"
|
||||||
|
su -c "cp -fv borg-gui.sh /opt/borg-zenity/"
|
||||||
|
su -c "cp -fv profile-manager.sh /opt/borg-zenity/"
|
||||||
|
|
||||||
|
else
|
||||||
# Copie des fichiers
|
# Copie des fichiers
|
||||||
sudo mkdir -vp /opt/borg-zenity
|
sudo mkdir -vp /opt/borg-zenity
|
||||||
sudo cp -fv icons/borg.svg /usr/share/icons/
|
sudo cp -fv icons/borg.svg /usr/share/icons/
|
||||||
@ -20,15 +44,23 @@ sudo cp -fv borg-zenity-sauvegarde.desktop /usr/share/applications/
|
|||||||
sudo cp -fv borg-zenity-gestprofils.desktop /usr/share/applications/
|
sudo cp -fv borg-zenity-gestprofils.desktop /usr/share/applications/
|
||||||
sudo cp -fv borg-gui.sh /opt/borg-zenity/
|
sudo cp -fv borg-gui.sh /opt/borg-zenity/
|
||||||
sudo cp -fv profile-manager.sh /opt/borg-zenity/
|
sudo cp -fv profile-manager.sh /opt/borg-zenity/
|
||||||
|
fi
|
||||||
|
|
||||||
# réglages des droits
|
# réglages des droits
|
||||||
|
if [[ "$OS" =~ "Debian" ]];then
|
||||||
|
su -c "chmod a+rx /opt/borg-zenity/borg-gui.sh"
|
||||||
|
su -c "chmod a+rx /opt/borg-zenity/profile-manager.sh"
|
||||||
|
|
||||||
|
else
|
||||||
sudo chmod a+rx /opt/borg-zenity/borg-gui.sh
|
sudo chmod a+rx /opt/borg-zenity/borg-gui.sh
|
||||||
sudo chmod a+rx /opt/borg-zenity/profile-manager.sh
|
sudo chmod a+rx /opt/borg-zenity/profile-manager.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# Création du fichier de configuration de base
|
# Création du fichier de configuration de base
|
||||||
mkdir -vp $HOME/.config/borg/
|
mkdir -vp $HOME/.config/borg/
|
||||||
cp -fv borg-zenity.conf $HOME/.config/borg/
|
cp -fv borg-zenity.conf $HOME/.config/borg/
|
||||||
|
|
||||||
|
# nettoyage
|
||||||
if [ -f readme.md ];then cd ..;fi
|
if [ -f readme.md ];then cd ..;fi
|
||||||
if [ -f borg-zenity.zip ];then rm -v borg-zenity.zip;fi
|
if [ -f borg-zenity.zip ];then rm -v borg-zenity.zip;fi
|
||||||
if [ -d borg-zenity ];then rm -rv borg-zenity;fi
|
if [ -d borg-zenity ];then rm -rv borg-zenity;fi
|
||||||
|
Loading…
Reference in New Issue
Block a user