-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·29 lines (22 loc) · 1.26 KB
/
install.sh
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
#!/bin/bash
set -euo pipefail
# renovate: datasource=git-tags versioning=regex depName=https://gitlab.com/freedesktop-sdk/freedesktop-sdk.git
FREEDESKTOP_SDK_GIT_VERSION=freedesktop-sdk-23.08.21
FREEDESKTOP_SDK_VERSION=$(echo ${FREEDESKTOP_SDK_GIT_VERSION} | cut -d'-' -f3 | cut -d'.' -f1-2)
HAS_NVIDIA=0
if [[ -f /proc/driver/nvidia/version ]]; then
HAS_NVIDIA=1
NVIDIA_VERISON=$(cat /proc/driver/nvidia/version | head -n 1 | awk '{ print $8 }' | sed 's/\./-/g')
fi
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --user --if-not-exists JagexLauncher https://jagexlauncher.flatpak.mcswain.dev/JagexLauncher.flatpakrepo
flatpak install --user -y --noninteractive flathub \
org.freedesktop.Platform//${FREEDESKTOP_SDK_VERSION} \
org.freedesktop.Platform.Compat.i386/x86_64/${FREEDESKTOP_SDK_VERSION} \
org.freedesktop.Platform.GL32.default/x86_64/${FREEDESKTOP_SDK_VERSION}
if [[ ${HAS_NVIDIA} -eq 1 ]]; then
flatpak install --user -y --noninteractive flathub \
org.freedesktop.Platform.GL.nvidia-${NVIDIA_VERISON}/x86_64 \
org.freedesktop.Platform.GL32.nvidia-${NVIDIA_VERISON}/x86_64
fi
flatpak install --or-update --user -y --noninteractive JagexLauncher com.jagex.Launcher