From fbc522e0fc6dfa7dd10d3f55c2de1d633397cca8 Mon Sep 17 00:00:00 2001 From: Matt Larsen Date: Fri, 25 Oct 2024 11:32:10 +0200 Subject: [PATCH] archive fix 2 --- games/carbon/sections/auto_update_validate.sh | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/games/carbon/sections/auto_update_validate.sh b/games/carbon/sections/auto_update_validate.sh index 84a0227..14b08a9 100644 --- a/games/carbon/sections/auto_update_validate.sh +++ b/games/carbon/sections/auto_update_validate.sh @@ -30,37 +30,19 @@ fi if [[ "${DOWNLOAD_METHOD}" == "Depot Downloader" ]]; then DEPOTDOWNLOADER_DIR="/home/container/DepotDownloader" - - # Check if DepotDownloader already exists if [ -f "${DEPOTDOWNLOADER_DIR}" ]; then echo "DepotDownloader found. Checking for updates..." - - # Get the current installed version using the -version tag INSTALLED_VERSION=$(${DEPOTDOWNLOADER_DIR} -version 2>&1 | grep -oP '\d+\.\d+\.\d+') - - # Get the latest release version from GitHub LATEST_VERSION=$(curl -s https://api.github.com/repos/SteamRE/DepotDownloader/releases/latest | grep 'tag_name' | cut -d '"' -f 4 | sed 's/DepotDownloader_//') - echo "Installed version: $INSTALLED_VERSION" echo "Latest version: $LATEST_VERSION" - if [ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]; then echo "Newer version available. Updating DepotDownloader..." - - # Create a temporary directory for download cd /tmp - - # Download the latest version of DepotDownloader curl -sSL -o DepotDownloader.zip https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_${LATEST_VERSION}/DepotDownloader-linux-x64.zip - - # Unzip the DepotDownloader package to /home/container - if unzip DepotDownloader.zip -d /home/container; then - # Clean up temporary files + if unzip -o DepotDownloader.zip -d /home/container; then rm -rf /tmp/* - - # Set permissions chmod +x /home/container/DepotDownloader - Warn "DepotDownloader updated to version $LATEST_VERSION. We need to restart your system in order to complete the install..." exit 0 else @@ -73,21 +55,11 @@ if [[ "${DOWNLOAD_METHOD}" == "Depot Downloader" ]]; then fi else echo "DepotDownloader not found. Installing DepotDownloader..." - - # Create a temporary directory for download cd /tmp - - # Download DepotDownloader from the provided URL curl -sSL -o DepotDownloader.zip https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.6.0/DepotDownloader-linux-x64.zip - - # Unzip the DepotDownloader package to /home/container - if unzip DepotDownloader.zip -d /home/container; then - # Set permissions + if unzip -o DepotDownloader.zip -d /home/container; then chmod +x /home/container/DepotDownloader - - # Clean up temporary files rm -rf /tmp/* - Warn "DepotDownloader installation completed successfully. We need to restart your system in order to complete the install..." exit 0 else