From e145c9c992ffc7a9adadb66e71d9985255675ae2 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Sat, 20 May 2023 19:32:00 -0600 Subject: [PATCH] Updated fetch-twitchdownloader.sh to get the latest release for the specific arch --- docker-utils/fetch-twitchdownloader.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 \