Files
playwish/install/get.sh
T
99admandClaude Opus 5.5 fc15f2b933 Umbenennung: Audiofy heißt jetzt Playwish
Name, Seitentitel, Dienste (playwish-web, playwish-controller), Dienst-Benutzer
(playwish), Pfade (/opt/playwish, /usr/local/src/playwish), Vorlagen und
Repository-Adresse. „Audiofy“ war bereits von mehreren Produkten belegt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:27:59 +01:00

51 lines
2.0 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# Playwish – Installation per Einzeiler (holt das Repository und startet das passende Install-Skript):
#
# curl -fsSL https://git.wind8000.de/0/playwish/raw/branch/main/install/get.sh | bash -s -- server
# curl -fsSL https://git.wind8000.de/0/playwish/raw/branch/main/install/get.sh | bash -s -- player
# … | bash -s -- server --update später aktualisieren (holt den neuesten Stand)
#
# Die Quellen liegen danach in /usr/local/src/playwish. Andere Quelle/Zweig:
# PLAYWISH_REPO=https://…/playwish.git PLAYWISH_BRANCH=main
set -euo pipefail
REPO="${PLAYWISH_REPO:-https://git.wind8000.de/0/playwish.git}"
ZWEIG="${PLAYWISH_BRANCH:-main}"
QUELLE="${PLAYWISH_SRC:-/usr/local/src/playwish}"
ROLLE="${1:-}"
[ $# -gt 0 ] && shift
case "$ROLLE" in
server|player) ;;
*) echo "Aufruf: curl -fsSL …/install/get.sh | bash -s -- server|player [--update]" >&2; exit 1 ;;
esac
if [ "$(id -u)" -eq 0 ]; then SUDO=""; else
command -v sudo >/dev/null || { echo "Bitte als root ausführen oder sudo installieren." >&2; exit 1; }
SUDO="sudo"
fi
echo "==> Playwish-Quellen holen ($REPO, Zweig $ZWEIG)"
if ! command -v git >/dev/null; then
$SUDO apt-get update -qq
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq git >/dev/null
fi
if [ -d "$QUELLE/.git" ]; then
$SUDO git -C "$QUELLE" fetch -q --depth 1 origin "$ZWEIG"
$SUDO git -C "$QUELLE" reset -q --hard FETCH_HEAD
else
$SUDO install -d -m 755 "$(dirname "$QUELLE")"
$SUDO git clone -q --depth 1 --branch "$ZWEIG" "$REPO" "$QUELLE"
fi
echo " Stand: $($SUDO git -C "$QUELLE" log -1 --format='%h %s')"
# Bei "curl | bash" ist die Standardeingabe das Skript selbst – Fragen müssen vom Terminal kommen.
if { : </dev/tty; } 2>/dev/null; then
exec bash "$QUELLE/install/install-$ROLLE.sh" "$@" </dev/tty
elif [[ " $* " == *" --update "* ]]; then
exec bash "$QUELLE/install/install-$ROLLE.sh" "$@" # Update fragt nichts
else
echo "Kein Terminal gefunden – die Installation braucht Eingaben. Bitte in einem Terminal ausführen." >&2
exit 1
fi