Added protondb.sh
This commit is contained in:
parent
16cf4280fd
commit
9dc6756eff
36
protondb.sh
Executable file
36
protondb.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo 'Creating temporary working directory...'
|
||||
rm -rf /tmp/proton-ge-custom
|
||||
mkdir /tmp/proton-ge-custom
|
||||
cd /tmp/proton-ge-custom
|
||||
|
||||
echo 'Getting ProtonGE metadata'
|
||||
METADATA=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4)
|
||||
test -n "$METADATA"
|
||||
# If result is not empty, continue
|
||||
|
||||
echo 'Fetching tarball URL...'
|
||||
TARBALL_URL=$(echo "$METADATA" | grep .tar.gz)
|
||||
TARBALL_NAME=$(basename "$TARBALL_URL")
|
||||
echo "Downloading tarball: $TARBALL_NAME..."
|
||||
curl -# -L "$TARBALL_URL" -o "$TARBALL_NAME" --no-progress-meter
|
||||
|
||||
echo 'Fetching checksum URL...'
|
||||
CHECKSUM_URL=$(echo "$METADATA" | grep .sha512sum)
|
||||
CHECKSUM_NAME=$(basename "$CHECKSUM_URL")
|
||||
echo "Downloading checksum: $CHECKSUM_NAME..."
|
||||
curl -# -L "$CHECKSUM_URL" -o "$CHECKSUM_NAME" --no-progress-meter
|
||||
|
||||
echo "Verifying tarball $TARBALL_NAME with checksum $CHECKSUM_NAME..."
|
||||
sha512sum -c "$CHECKSUM_NAME"
|
||||
# If result is ok, continue
|
||||
|
||||
echo 'Creating Steam directory if it does not exist...'
|
||||
mkdir -p ~/.steam/root/compatibilitytools.d
|
||||
|
||||
echo "Extracting $TARBALL_NAME to Steam directory..."
|
||||
tar -xf "$TARBALL_NAME" -C ~/.steam/root/compatibilitytools.d/
|
||||
echo 'All done :)'
|
Loading…
x
Reference in New Issue
Block a user