is there a better way to do this? like so it automatically grabs the latest version, ive…
- User
is there a better way to do this? like so it automatically grabs the latest version, ive tried using the api but arch linux cant seem to extract the .tar file correctly? echo "0" echo "# Detecting and Installing GE-Proton"
check to make sure compatabilitytools.d exists and makes it if it doesnt
if [ ! -d "$HOME/.steam/root/compatibilitytools.d" ]; then mkdir -p "$HOME/.steam/root/compatibilitytools.d"fi
Create NonSteamLaunchersInstallation subfolder in Downloads folder
mkdir -p ~/Downloads/NonSteamLaunchersInstallation
Set the path to the Proton directory
proton_dir=$(find ~/.steam/root/compatibilitytools.d -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1)
Set the URLs to download GE-Proton from
ge_proton_url1=https://github.com/GloriousEggroll/proton-ge-custom/releases/latest/download/GE-Proton.tar.gz ge_proton_url2=https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-3/GE-Proton8-3.tar.gz
Check if GE-Proton is installed
if [ -z "proton_dir" ]; then # Download GE-Proton using the first URL echo "Downloading GE-Proton using the first URL" wget ge_proton_url1 -O ~/Downloads/NonSteamLaunchersInstallation/GE-Proton.tar.gz
# Check if the download succeeded if [ $? -ne 0 ]; then # Download GE-Proton using the second URL echo "Downloading GE-Proton using the second URL" wget $ge_proton_url2 -O ~/Downloads/NonSteamLaunchersInstallation/GE-Proton.tar.gz fi # Check if either download succeeded if [ $? -eq 0 ]; then # Install GE-Proton echo "Installing GE-Proton" tar -xvf ~/Downloads/NonSteamLaunchersInstallation/GE-Proton.tar.gz -C ~/.steam/root/compatibilitytools.d/ proton_dir=$(find ~/.steam/root/compatibilitytools.d -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1) else # Handle download failure echo "Failed to download GE-Proton" fielse
Check if installed version is the latest version
installed_version=proton_dir | sed 's/GE-Proton-//') latest_version=installed_version" != "latest_version" ]; then # Download GE-Proton using the first URL echo "Downloading GE-Proton using the first URL" wget ge_proton_url1 -O ~/Downloads/NonSteamLaunchersInstallation/GE-Proton.tar.gz
# Check if the download succeeded if [ $? -ne 0 ]; then # Download GE-Proton using the second URL echo "Downloading GE-Proton using the second URL" wget $ge_proton_url2 -O ~/Downloads/NonSteamLaunchersInstallation/GE-Proton.tar.gz fi # Check if either download succeeded if [ $? -eq 0 ]; then # Install GE-Proton echo "Installing GE-Proton" tar -xvf ~/Downloads/NonSteamLaunchersInstallation/GE-Proton.tar.gz -C ~/.steam/root/compatibilitytools.d/ proton_dir=$(find ~/.steam/root/compatibilitytools.d -maxdepth 1 -type d -name "GE-Proton*" | sort -V | tail -n1) else # Handle download failure echo "Failed to download GE-Proton" fi fifi
- Assistant
One way to automatically grab the latest version of GE-Proton is to use the GitHub API to retrieve the latest release version and download the corresponding file. Here's an example script that does this:
#!/bin/bash echo "Detecting and Installing GE-Proton" # Set the URL to GE-Proton's GitHub page ge_proton_url="https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest" # Get the latest release version from the API latest_version=$(curl -s "$ge_proton_url" | grep -Po '"tag_name": "\K.*?(?=")') # Set the URL to download the corresponding file ge_proton_url="https://github.com/GloriousEggroll/proton-ge-custom/releases/download/$latest_version/GE-$latest_version.tar.gz" # Set the path to the Proton directory proton_dir="$HOME/.steam/root/compatibilitytools.d/$(echo "$latest_version" | tr '.' '-')" # Check if GE-Proton is already installed if [ -d "$proton_dir" ]; then echo "GE-Proton $latest_version is already installed" else # Download and install GE-Proton echo "Downloading GE-Proton $latest_version" wget "$ge_proton_url" -P "$HOME/Downloads/" tar -xvf "$HOME/Downloads/GE-$latest_version.tar.gz" -C "$HOME/.steam/root/compatibilitytools.d/" echo "Installed GE-Proton $latest_version" fiThis script first uses the GitHub API to retrieve the latest release version of GE-Proton. It then constructs the URL to download the corresponding file and sets the path to the Proton directory. If the directory already exists, the script assumes that the latest version is already installed and exits. Otherwise, it downloads the file and installs GE-Proton to the Proton directory.
Note that this script assumes that the
wgetandtarcommands are installed on the system.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.