summaryrefslogtreecommitdiff
path: root/raveos-app-installer/data/actions/lutris.sh
blob: dda62747f8f0e7ad4bfee875852982637b60e7c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Lutris + Wine telepítő script
# Környezeti változók: INSTALL_USER, INSTALL_HOME

set -e

USER="$INSTALL_USER"
HOME="$INSTALL_HOME"
ACTION="${1:-install}"

remove_installed_packages() {
    local installed=()
    local pkg
    for pkg in "$@"; do
        if pacman -Qq "$pkg" >/dev/null 2>&1; then
            installed+=("$pkg")
        fi
    done
    if ((${#installed[@]})); then
        pacman -Rcns --noconfirm "${installed[@]}"
    fi
}

if [[ "$ACTION" == "remove" ]]; then
    echo "Removing Lutris + Wine for $USER..."
    remove_installed_packages lutris wine winetricks wine-mono wine-gecko
    echo "Lutris + Wine removal complete!"
    exit 0
fi

echo "Installing Lutris + Wine for $USER..."

# Lutris és Wine telepítése
pacman -S --noconfirm --needed \
    lutris \
    wine \
    winetricks \
    wine-mono \
    wine-gecko

echo "Lutris + Wine installation complete!"