-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
41 lines (35 loc) · 1.36 KB
/
install.sh
File metadata and controls
41 lines (35 loc) · 1.36 KB
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
# scriptlet:_common/download.sh
##
# Install Glorious Eggroll's Proton fork on a requested version
#
# https://github.com/GloriousEggroll/proton-ge-custom
#
# Will install Proton into /opt/script-collection/GE-Proton${VERSION}
# with its pfx directory in /opt/script-collection/GE-Proton${VERSION}/files/share/default_pfx
#
# @arg $1 string Proton version to install
#
# CHANGELOG:
# 2025.11.23 - Use download scriptlet for downloading
# 2024.12.22 - Initial version
#
function install_proton() {
VERSION="${1:-9-21}"
echo "Installing Glorious Eggroll's Proton $VERSION..."
PROTON_URL="https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton${VERSION}/GE-Proton${VERSION}.tar.gz"
PROTON_TGZ="$(basename "$PROTON_URL")"
PROTON_NAME="$(basename "$PROTON_TGZ" ".tar.gz")"
# We will use this directory as a working directory for source files that need downloaded.
[ -d /opt/script-collection ] || mkdir -p /opt/script-collection
# Grab Proton from Glorious Eggroll
if [ ! -e "/opt/script-collection/$PROTON_TGZ" ]; then
if ! download "$PROTON_URL" "/opt/script-collection/$PROTON_TGZ"; then
echo "install_proton: Cannot download Proton from ${PROTON_URL}!" >&2
return 1
fi
fi
# Extract GE Proton into /opt
if [ ! -e "/opt/script-collection/$PROTON_NAME" ]; then
tar -x -C /opt/script-collection/ -f "/opt/script-collection/$PROTON_TGZ"
fi
}