32 lines
974 B
Bash
32 lines
974 B
Bash
|
#!/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
|