protondb.sh : now checks if latest proton-ge is already installed
This commit is contained in:
parent
9dc6756eff
commit
8c512d1ba8
@ -7,6 +7,9 @@ rm -rf /tmp/proton-ge-custom
|
||||
mkdir /tmp/proton-ge-custom
|
||||
cd /tmp/proton-ge-custom
|
||||
|
||||
echo 'Creating Steam directory if it does not exist...'
|
||||
mkdir -p ~/.steam/root/compatibilitytools.d
|
||||
|
||||
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"
|
||||
@ -15,6 +18,8 @@ test -n "$METADATA"
|
||||
echo 'Fetching tarball URL...'
|
||||
TARBALL_URL=$(echo "$METADATA" | grep .tar.gz)
|
||||
TARBALL_NAME=$(basename "$TARBALL_URL")
|
||||
VERSION_NAME=$(echo "$TARBALL_NAME" | sed 's/.tar.gz//')
|
||||
test -d ~/.steam/root/compatibilitytools.d/"$VERSION_NAME" && echo "Version $VERSION_NAME already present, aborting" && exit 0
|
||||
echo "Downloading tarball: $TARBALL_NAME..."
|
||||
curl -# -L "$TARBALL_URL" -o "$TARBALL_NAME" --no-progress-meter
|
||||
|
||||
@ -28,9 +33,6 @@ 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