borg-zenity/install.sh

38 lines
1.1 KiB
Bash
Raw Normal View History

2021-05-08 13:27:24 +02:00
#! /bin/bash
# Borg zenity install and update
which zenity
if [ "$?" != "0" ]; then
bash testdistro.sh || exit
fi
which borg
if [ "$?" != "0" ]; then
bash testdistro.sh || exit
fi
2022-04-15 10:20:13 +02:00
# Copie des fichiers
sudo mkdir -vp /opt/borg-zenity
sudo cp -fv icons/borg.svg /usr/share/icons/
sudo cp -fv icons/borgzenity-profils.svg /usr/share/icons/
sudo cp -fv icons/borgzenity-sauvegarde.svg /usr/share/icons/
sudo cp -fv borg-zenity-sauvegarde.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 profile-manager.sh /opt/borg-zenity/
2021-05-08 13:27:24 +02:00
2022-04-15 10:20:13 +02:00
# réglages des droits
sudo chmod a+rx /opt/borg-zenity/borg-gui.sh
sudo chmod a+rx /opt/borg-zenity/profile-manager.sh
2022-04-15 10:20:13 +02:00
# Création du fichier de configuration de base
mkdir -vp $HOME/.config/borg/
cp -fv borg-zenity.conf $HOME/.config/borg/
if [ -f readme.md ];then cd ..;fi
if [ -f borg-zenity.zip ];then rm -v borg-zenity.zip;fi
if [ -d borg-zenity ];then rm -rv borg-zenity;fi
echo "--------------------"
echo "Installation terminée."