diff --git a/docker-utils/fetch-twitchdownloader.sh b/docker-utils/fetch-twitchdownloader.sh index 43b5a21..661cdbb 100644 --- a/docker-utils/fetch-twitchdownloader.sh +++ b/docker-utils/fetch-twitchdownloader.sh @@ -1,4 +1,4 @@ -!/bin/bash -eu +#!/bin/sh # THANK YOU TALULAH (https://github.com/nottalulah) for your help in figuring this out # and also optimizing some code with this commit. @@ -23,7 +23,7 @@ esac echo "(INFO) Architecture detected: $ARCH" echo "(1/5) READY - Install unzip" apt-get update && apt-get -y install unzip curl jq libicu70 -VERSION=$(curl --silent "https://api.github.com/repos/lay295/TwitchDownloader/releases/latest" | jq -r .tag_name) +VERSION=$(curl --silent "https://api.github.com/repos/lay295/TwitchDownloader/releases" | jq -r --arg arch "$ARCH" '[.[] | select(.assets | length > 0) | select(.assets[].name | contains("CLI") and contains($arch))] | max_by(.published_at) | .tag_name') echo "(2/5) DOWNLOAD - Acquire twitchdownloader" curl -o twitchdownloader.zip \ --connect-timeout 5 \