Skip to content

Commit

Permalink
fix(install.sh): pull latest release from github
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Mar 22, 2024
1 parent d29039c commit fd14964
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
set -e

# TODO: Make this smarter so we don't have to update it every release
VERSION="0.5.1"
# We're pulling from the latest web page to prevent rate limiting
VERSION=$(curl -fsSL "https://github.com/rain-cafe/protontweaks/releases/latest" | grep -E -m 1 "/rain-cafe/protontweaks/tree/" | grep -Eo -m 1 "v[0-9]+.[0-9]+.[0-9]+" | head -1)

echo "Detected '$VERSION' as the latest version."

DEB_PACKAGE="https://github.com/rain-cafe/protontweaks/releases/download/v$VERSION/protontweaks.deb"
RPM_PACKAGE="https://github.com/rain-cafe/protontweaks/releases/download/v$VERSION/protontweaks.rpm"

Expand Down Expand Up @@ -113,4 +116,8 @@ esac

echo "Install completed successfully!"

if [[ $manager != "nixos" && $manager != "nix" ]]; then
protontweaks setup
fi


0 comments on commit fd14964

Please sign in to comment.