scripts/install.sh
2024-01-08 14:38:13 +01:00

31 lines
974 B
Bash
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Script d'installation pour les scripts suivants :
# - mux-shufflizer
# - mux-track
# - plaque
# - tiregom
source=$(dirname $0)
if [ "$1" = "uninstall" ]; then sudo rm -v /usr/bin/{shufflizer,track,plaque,tiregom}; sudo rm /etc/mux-scripts; exit; fi
echo
echo Installation des scripts...
echo
if [ -f "/etc/mux-scripts" ]; then maj=1; else maj=0; fi
sudo cp -v $source/shufflizer/shufflizer.sh /usr/bin/shufflizer
sudo cp -v $source/track/track.sh /usr/bin/track
sudo cp -v $source/plaque/plaque.sh /usr/bin/plaque
sudo cp -v $source/tiregom/tiregom.sh /usr/bin/tiregom
sudo touch /etc/mux-scripts
echo
if [ $maj = 0 ]; then echo "Installation OK."; else echo "Mise à jour OK."; fi
echo "Vous pouvez aussi mettre à jour les scripts en exécutant cette commande :"
if [ "$source" != "." ]; then echo "cd $source"; fi
echo "git pull"
echo "./install.sh"
echo
echo "Pour désinstaller les scripts, exécutez simplement :"
echo "./install.sh uninstall"
echo