Feat: Fügt LibreOffice-Templates hinzu.
This commit is contained in:
parent
4f1d2e2602
commit
9b0687eb1b
@ -14,7 +14,7 @@ if ! command -v flatpak &>/dev/null; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Flatpak Apps installieren (nur falls noch nicht vorhanden)
|
||||
# Flatpak Apps installieren (nur falls noch nicht als DEB installiert)
|
||||
declare -A FLATPAK_APPS=(
|
||||
["org.libreoffice.LibreOffice"]="LibreOffice"
|
||||
["dev.vencord.Vesktop"]="Vesktop"
|
||||
@ -22,14 +22,46 @@ declare -A FLATPAK_APPS=(
|
||||
)
|
||||
|
||||
for APP in "${!FLATPAK_APPS[@]}"; do
|
||||
if flatpak list | grep -q "$APP"; then
|
||||
echo "✅ ${FLATPAK_APPS[$APP]} ist bereits installiert."
|
||||
if dpkg -l | grep -iq "${FLATPAK_APPS[$APP]}"; then
|
||||
echo "✅ ${FLATPAK_APPS[$APP]} ist bereits als DEB-Paket installiert."
|
||||
elif flatpak list | grep -q "$APP"; then
|
||||
echo "✅ ${FLATPAK_APPS[$APP]} ist bereits als Flatpak installiert."
|
||||
else
|
||||
echo "🔄 Installiere ${FLATPAK_APPS[$APP]}..."
|
||||
echo "🔄 Installiere ${FLATPAK_APPS[$APP]} als Flatpak..."
|
||||
flatpak install -y flathub "$APP"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# Dynamischen Vorlagen-Ordner ermitteln
|
||||
TEMPLATE_DIR=$(xdg-user-dir TEMPLATES 2>/dev/null || echo "$HOME/Vorlagen")
|
||||
mkdir -p "$TEMPLATE_DIR"
|
||||
|
||||
# Prüfen, ob LibreOffice als Flatpak installiert ist
|
||||
if flatpak list | grep -q "org.libreoffice.LibreOffice"; then
|
||||
LO_CMD="flatpak run org.libreoffice.LibreOffice"
|
||||
elif command -v libreoffice &>/dev/null; then
|
||||
LO_CMD="libreoffice"
|
||||
else
|
||||
echo "❌ Fehler: LibreOffice ist weder als Flatpak noch als DEB-Paket installiert."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# LibreOffice-Vorlagen erstellen, falls nicht vorhanden
|
||||
if [[ ! -f "$TEMPLATE_DIR/LibreOffice-Writer.ott" ]]; then
|
||||
echo "🔄 Erstelle LibreOffice Writer-Vorlage..."
|
||||
$LO_CMD --headless --convert-to ott --outdir "$TEMPLATE_DIR" /dev/null
|
||||
else
|
||||
echo "✅ LibreOffice Writer-Vorlage ist bereits vorhanden."
|
||||
fi
|
||||
|
||||
if [[ ! -f "$TEMPLATE_DIR/LibreOffice-Calc.ots" ]]; then
|
||||
echo "🔄 Erstelle LibreOffice Calc-Vorlage..."
|
||||
$LO_CMD --headless --convert-to ots --outdir "$TEMPLATE_DIR" /dev/null
|
||||
else
|
||||
echo "✅ LibreOffice Calc-Vorlage ist bereits vorhanden."
|
||||
fi
|
||||
|
||||
# Spotify-Installation
|
||||
echo "🎵 Überprüfe Spotify-Installation..."
|
||||
SPOTIFY_KEY="/etc/apt/trusted.gpg.d/spotify.gpg"
|
||||
@ -64,6 +96,7 @@ for dep in "${dependencies[@]}"; do
|
||||
else
|
||||
echo "✅ $dep ist bereits installiert."
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# Tealdeer (tldr-Client) installieren
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user