Skip to content

Instantly share code, notes, and snippets.

@ProjectSynchro
Created August 25, 2021 01:05
Show Gist options
  • Save ProjectSynchro/902f89ce2d3ff4f7f713f2c61b669821 to your computer and use it in GitHub Desktop.
Save ProjectSynchro/902f89ce2d3ff4f7f713f2c61b669821 to your computer and use it in GitHub Desktop.
Grabs the latest release of proton ge and dumps it in ~/.steam/root/compatibilitytools.d
#!/bin/bash
TARGET_DIR="${HOME}/.steam/root/compatibilitytools.d/"
pushd ${TARGET_DIR} &> /dev/null
printf "Getting a release header information"
LATEST_TAG=$(curl -L -s -H 'Accept: application/json' https://github.com/GloriousEggroll/proton-ge-custom/releases/latest)
LATEST_VERSION=$(echo $LATEST_TAG | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
FILE_NAME="Proton-${LATEST_VERSION}.tar.gz"
printf "Building URL:"
TARGET_URL="https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${LATEST_VERSION}/${FILE_NAME}"
echo "$TARGET_URL"
printf "Downloading release"
curl -OLs ${TARGET_URL}
echo "Done"
printf "untar archive"
tar xf ./${FILE_NAME}
echo "Done"
printf "Removing temp archive"
rm ./${FILE_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment