Add proton-ge-setup.sh
This commit is contained in:
parent
98d3e95554
commit
fc44c7c2ff
1 changed files with 37 additions and 0 deletions
37
proton-ge-setup.sh
Normal file
37
proton-ge-setup.sh
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Incase of pipefail stop the script
|
||||
set -euo pipefail
|
||||
|
||||
# make temp working directory
|
||||
echo "Creating temporary working directory..."
|
||||
rm -rf /tmp/proton-ge-custom
|
||||
mkdir /tmp/proton-ge-custom
|
||||
cd /tmp/proton-ge-custom
|
||||
|
||||
# download tarball
|
||||
echo "Fetching tarball URL..."
|
||||
tarball_url=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .tar.gz)
|
||||
tarball_name=$(basename $tarball_url)
|
||||
echo "Downloading tarball: $tarball_name..."
|
||||
curl -# -L $tarball_url -o $tarball_name --no-progress-meter
|
||||
|
||||
# download checksum
|
||||
echo "Fetching checksum URL..."
|
||||
checksum_url=$(curl -s https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest | grep browser_download_url | cut -d\" -f4 | grep .sha512sum)
|
||||
checksum_name=$(basename $checksum_url)
|
||||
echo "Downloading checksum: $checksum_name..."
|
||||
curl -# -L $checksum_url -o $checksum_name --no-progress-meter
|
||||
|
||||
# check tarball with checksum
|
||||
echo "Verifying tarball $tarball_name with checksum $checksum_name..."
|
||||
sha512sum -c $checksum_name
|
||||
# if result is ok, continue
|
||||
|
||||
# make steam directory if it does not exist
|
||||
echo "Creating Steam directory if it does not exist..."
|
||||
mkdir -p ~/.steam/root/compatibilitytools.d
|
||||
|
||||
# extract proton tarball to steam directory
|
||||
echo "Extracting $tarball_name to Steam directory..."
|
||||
tar -xf $tarball_name -C ~/.steam/root/compatibilitytools.d/
|
Loading…
Add table
Reference in a new issue