Initialer Commit
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
|
||||
#jellyfin-web neu clonen
|
||||
cd ../
|
||||
rm -rf jellyfin-web
|
||||
echo "jellyfin-web gelöscht"
|
||||
|
||||
# --- NEUER TEIL START ---
|
||||
# 1. Ermitteln des neuesten Release-Tags via GitHub API
|
||||
# Wir nutzen curl und grep, um die Version (z.B. "v10.9.11") zu extrahieren
|
||||
LATEST_TAG=$(curl -s https://api.github.com/repos/jellyfin/jellyfin-web/releases/latest | grep "tag_name" | cut -d '"' -f 4)
|
||||
|
||||
echo "Lade aktuellstes Release herunter: $LATEST_TAG"
|
||||
|
||||
# 2. Klonen des spezifischen Tags
|
||||
# --branch $LATEST_TAG: Wählt die Version aus
|
||||
# --depth 1: Lädt nur den aktuellen Stand, nicht die ganze Historie (spart Zeit/Platz)
|
||||
git clone --branch "$LATEST_TAG" --depth 1 https://github.com/jellyfin/jellyfin-web
|
||||
# --- NEUER TEIL ENDE ---
|
||||
|
||||
echo "jellyfin-web ($LATEST_TAG) geklont"
|
||||
cd webbranding
|
||||
#Dateien runterladen (frischer Stand und so)
|
||||
wget -q https://raw.githubusercontent.com/jellyfin/jellyfin-web/master/src/scripts/libraryMenu.js -O scripts/libraryMenu.js
|
||||
wget -q https://raw.githubusercontent.com/jellyfin/jellyfin-web/master/src/index.html -O index.html
|
||||
|
||||
#Custom Links einfügen
|
||||
sed -i '/class="customMenuOptions"/d' scripts/libraryMenu.js
|
||||
sed -i '/placeholder for custom menu links/r vorlagen/custom_links_insert' scripts/libraryMenu.js
|
||||
|
||||
#custom Titel
|
||||
sed -i "s/document\.title = 'Jellyfin'/document\.title = 'Chicanoflix'/g" scripts/libraryMenu.js
|
||||
sed -i "s/document\.title = title || 'Jellyfin'/document\.title = title || 'Chicanoflix'/g" scripts/libraryMenu.js
|
||||
|
||||
#index.html anpassen
|
||||
sed -i "s|content=\"https://jellyfin.org\"|content=\"https://fc-chicanos.de\"|g" index.html
|
||||
sed -i "s/content=\"Jellyfin\"/content=\"Chicanoflix\"/g" index.html
|
||||
sed -i "s|content=\"The Free Software Media System\"|content=\"Chicanoflix und Chill\"|g" index.html
|
||||
sed -i "s|<title>Jellyfin</title>|<title>Chicanoflix</title>|g" index.html
|
||||
sed -i '/<div class="mainDrawerHandle">/r vorlagen/index.manuell' index.html
|
||||
|
||||
#Bilder in Projekt-Ordner kopieren
|
||||
cp assets/img/* ../jellyfin-web/src/assets/img/
|
||||
cp assets/splash/* ../jellyfin-web/src/assets/splash/
|
||||
|
||||
#customLinks-Datei und index.html kopieren
|
||||
cp scripts/libraryMenu.js ../jellyfin-web/src/scripts/
|
||||
cp index.html ../jellyfin-web/src/
|
||||
|
||||
#tv-Oberfläche
|
||||
cp components/CustomCss.tsx ../jellyfin-web/src/components/
|
||||
|
||||
#favicons kopieren
|
||||
cp root/* ../jellyfin-web/src/
|
||||
|
||||
#build ausführen?
|
||||
read -p "Build ausführen?" yn
|
||||
case $yn in
|
||||
[Yy]* ) cd ../jellyfin-web;npm install; npm run build:production;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "Bitte y oder n eingeben.";;
|
||||
esac
|
||||
|
||||
#ab sofort auch wieder die Icons usw. ersetzen:
|
||||
# Pfade definieren
|
||||
SOURCE_DIR="/home/sandro/Projekte/webbranding/assets/img"
|
||||
TARGET_DIR="/home/sandro/Projekte/jellyfin-web/dist"
|
||||
|
||||
# Prüfen, ob Quellverzeichnis existiert
|
||||
if [ ! -d "$SOURCE_DIR" ]; then
|
||||
echo "Fehler: Quellverzeichnis $SOURCE_DIR nicht gefunden."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starte Branding-Prozess..."
|
||||
|
||||
# Loop durch alle Dateien im Branding-Ordner
|
||||
for source_file in "$SOURCE_DIR"/*; do
|
||||
# Dateiname ohne Pfad extrahieren (z.B. banner-dark.png)
|
||||
filename=$(basename "$source_file")
|
||||
|
||||
# Name und Endung trennen (z.B. banner-dark und png)
|
||||
name="${filename%.*}"
|
||||
extension="${filename##*.}"
|
||||
|
||||
# Suche im Zielverzeichnis nach einer Datei, die mit "name" beginnt
|
||||
# und mit "extension" endet (ignoriert den Hash dazwischen)
|
||||
target_match=$(find "$TARGET_DIR" -name "${name}.*.${extension}" | head -n 1)
|
||||
|
||||
if [ -n "$target_match" ]; then
|
||||
echo "Ersetze: $(basename "$target_match") -> durch $filename"
|
||||
cp "$source_file" "$target_match"
|
||||
else
|
||||
echo "Warnung: Keine Ziel-Datei für '$name' in $TARGET_DIR gefunden."
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Fertig! Branding wurde angewendet."
|
||||
Reference in New Issue
Block a user