add spotify_player

This commit is contained in:
Simon Rieger 2025-04-12 17:10:09 +02:00
parent 2423ac570d
commit 0a2d82658b
2 changed files with 6 additions and 22 deletions

View file

@ -235,6 +235,7 @@ autoload -Uz compinit
compinit
eval "$(starship init zsh)"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
test -e "$HOME/.shellfishrc" && source "$HOME/.shellfishrc"

View file

@ -87,28 +87,11 @@ else
echo "cliphist ist bereits installiert, überspringe Download"
fi
# Spotify Player mit Prüfung
if [[ ! -f /usr/bin/spotify_player ]]; then
# Architektur ermitteln
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
URL="https://github.com/aome510/spotify-player/releases/download/v0.20.4/spotify_player-aarch64-unknown-linux-gnu.tar.gz"
elif [ "$ARCH" = "x86_64" ]; then
URL="https://github.com/aome510/spotify-player/releases/download/v0.20.4/spotify_player-x86_64-unknown-linux-gnu.tar.gz"
# Homebrew mit Prüfung
if ! command -v brew &>/dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Nicht unterstützte Architektur: $ARCH"
exit 1
fi
# Herunterladen und Entpacken
echo "Lade spotify_player von $URL herunter..."
curl -L "$URL" | tar -xz -C /tmp || { echo "Fehler beim Herunterladen oder Entpacken"; exit 1; }
# Datei verschieben und ausführbar machen
sudo mv /tmp/spotify_player /usr/bin/spotify_player
sudo chmod +x /usr/bin/spotify_player
echo "spotify_player wurde auf dem System installiert"
else
echo "spotify_player ist bereits installiert, überspringe Download"
echo "Homebrew ist bereits installiert, überspringe Installation"
fi
brew install spotify_player