Skip to content

Commit

Permalink
Fix more Shellcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yaakov-h committed Sep 1, 2024
1 parent 05ffed6 commit 23fdc3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
LATEST_VERSION=$(gh api repos/SteamRE/DepotDownloader/releases/latest | jq -r ".name" | sed 's/DepotDownloader[_ ]//')

Check failure on line 3 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Check failure on line 3 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Check failure on line 3 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Check failure on line 3 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).
CURRENT_VERSION=$(grep 'version "' Casks/depotdownloader.rb | cut -d '"' -f 2)

Check failure on line 4 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Check failure on line 4 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

if [[ "$LATEST_VERSION" = "$CURRENT_VERSION" ]]
if [[ "${LATEST_VERSION}" = "${CURRENT_VERSION}" ]]
then
echo "DepotDownloader Cask is up to date."
exit 0
Expand All @@ -21,10 +21,10 @@ update_for_arch() {
FILE_ARCH=$2

FILE_SHA_256=$(curl -fSsL -o - "https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_${LATEST_VERSION}/DepotDownloader-macos-${FILE_ARCH}.zip" | shasum -a 256 | awk '{print $1}')

Check failure on line 23 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Check failure on line 23 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Check failure on line 23 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).

Check failure on line 23 in Scripts/update.sh

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

Consider invoking this command separately to avoid masking its return value (or use '|| true' to ignore).
$SED_INLINE "s/${BREW_ARCH}:\([ \t]*\)\"[0-9a-f]*\"/${BREW_ARCH}:\1\"${FILE_SHA_256}\"/g" Casks/depotdownloader.rb
${SED_INLINE} "s/${BREW_ARCH}:\([ \t]*\)\"[0-9a-f]*\"/${BREW_ARCH}:\1\"${FILE_SHA_256}\"/g" Casks/depotdownloader.rb
}

$SED_INLINE "s/version \"${CURRENT_VERSION}\"/version \"${LATEST_VERSION}\"/" Casks/depotdownloader.rb
${SED_INLINE} "s/version \"${CURRENT_VERSION}\"/version \"${LATEST_VERSION}\"/" Casks/depotdownloader.rb
update_for_arch arm arm64
update_for_arch intel x64

Expand Down

0 comments on commit 23fdc3e

Please sign in to comment.