Skip to content

Commit

Permalink
archive fix 3
Browse files Browse the repository at this point in the history
  • Loading branch information
SturdyStubs committed Oct 25, 2024
1 parent fbc522e commit 23a9160
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion games/carbon/sections/auto_update_validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ fi

if [[ "${DOWNLOAD_METHOD}" == "Depot Downloader" ]]; then
DEPOTDOWNLOADER_DIR="/home/container/DepotDownloader"
VERSION_FILE="/home/container/depotdownloader_version"
if [ -f "${DEPOTDOWNLOADER_DIR}" ]; then
echo "DepotDownloader found. Checking for updates..."
INSTALLED_VERSION=$(${DEPOTDOWNLOADER_DIR} -version 2>&1 | grep -oP '\d+\.\d+\.\d+')
if [ -f "$VERSION_FILE" ]; then
INSTALLED_VERSION=$(cat "$VERSION_FILE")
else
INSTALLED_VERSION=$(${DEPOTDOWNLOADER_DIR} -version 2>&1 | grep -oP '\d+\.\d+\.\d+')
echo "$INSTALLED_VERSION" > "$VERSION_FILE"
fi
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"
Expand All @@ -43,6 +49,7 @@ if [[ "${DOWNLOAD_METHOD}" == "Depot Downloader" ]]; then
if unzip -o DepotDownloader.zip -d /home/container; then
rm -rf /tmp/*
chmod +x /home/container/DepotDownloader
echo "$LATEST_VERSION" > "$VERSION_FILE"
Warn "DepotDownloader updated to version $LATEST_VERSION. We need to restart your system in order to complete the install..."
exit 0
else
Expand All @@ -59,6 +66,7 @@ if [[ "${DOWNLOAD_METHOD}" == "Depot Downloader" ]]; then
curl -sSL -o DepotDownloader.zip https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.6.0/DepotDownloader-linux-x64.zip
if unzip -o DepotDownloader.zip -d /home/container; then
chmod +x /home/container/DepotDownloader
echo "2.6.0" > "$VERSION_FILE"
rm -rf /tmp/*
Warn "DepotDownloader installation completed successfully. We need to restart your system in order to complete the install..."
exit 0
Expand Down

0 comments on commit 23a9160

Please sign in to comment.