diff --git a/README.md b/README.md index 1363c1a..aec7075 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,11 @@ Adds a USB power control entry in the moOde UI. ## 🚀 Quick Install (one command) +```bash +curl -L https://git.celjim.fr/jimmyGALLAND/moodeaudio-usb-control/raw/branch/master/src/install.sh | bash +``` +or + ```bash curl -L https://git.celjim.fr/jimmyGALLAND/moodeaudio-usb-control/releases/download/latest/moodeaudio-usb-control.tar.gz | tar xz && chmod +x ./install.sh && sudo ./install.sh ``` @@ -20,10 +25,14 @@ curl -L https://git.celjim.fr/jimmyGALLAND/moodeaudio-usb-control/releases/downl ```bash sudo ./uninstall.sh ``` -## 🧼 Version compatibility cheched -9.4.1 + +## 🧼 Version compatibility checked + +10.1.2 +9.4.1 ## 📜 License This project is licensed under the GNU General Public License v3.0 (GPLv3). + ![License](https://img.shields.io/badge/license-GPLv3-blue.svg) \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..834fa8e --- /dev/null +++ b/install.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +REPO_URL="https://git.celjim.fr/jimmyGALLAND/moodeaudio-usb-control/releases/download/latest/moodeaudio-usb-control.tar.gz" + +TMP_DIR=$(mktemp -d) +ARCHIVE="$TMP_DIR/archive.tar.gz" + +echo "== Téléchargement du plugin ==" +curl -L "$REPO_URL" -o "$ARCHIVE" + +echo "== Extraction ==" +tar -xzf "$ARCHIVE" -C "$TMP_DIR" + +if [ ! -f "$TMP_DIR/install.sh" ]; then + echo "Erreur: install.sh introuvable dans l'archive" + exit 1 +fi + +chmod +x "$TMP_DIR/install.sh" + +echo "== Lancement de l'installation ==" +cd "$TMP_DIR" +sudo ./install.sh + +echo "== Nettoyage ==" +rm -rf "$TMP_DIR" + +echo "== Installation terminée ==" \ No newline at end of file