mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-07 12:00:01 +03:00
Update Dockerfile, Update CI PR, use scripts to download twitchdownloader
This commit is contained in:
committed by
Dedy Martadinata Supriyadi
parent
80b41af620
commit
9fa1aab1e5
39
docker-utils/fetch-twitchdownloader.sh
Normal file
39
docker-utils/fetch-twitchdownloader.sh
Normal file
@@ -0,0 +1,39 @@
|
||||
!/bin/sh
|
||||
|
||||
# THANK YOU TALULAH (https://github.com/nottalulah) for your help in figuring this out
|
||||
# and also optimizing some code with this commit.
|
||||
# xoxo :D
|
||||
|
||||
case $(uname -m) in
|
||||
x86_64)
|
||||
ARCH=Linux-x64;;
|
||||
aarch64)
|
||||
ARCH=LinuxArm64;;
|
||||
armhf)
|
||||
ARCH=LinuxArm;;
|
||||
armv7)
|
||||
ARCH=LinuxArm;;
|
||||
armv7l)
|
||||
ARCH=LinuxArm;;
|
||||
*)
|
||||
echo "Unsupported architecture: $(uname -m)"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
echo "(INFO) Architecture detected: $ARCH"
|
||||
echo "(1/5) READY - Install unzip"
|
||||
apt-get update && apt-get -y install unzip curl jq libicu66
|
||||
VERSION=$(curl --silent "https://api.github.com/repos/lay295/TwitchDownloader/releases/latest" | jq -r .tag_name)
|
||||
echo "(2/5) DOWNLOAD - Acquire twitchdownloader"
|
||||
curl -o twitchdownloader.zip \
|
||||
--connect-timeout 5 \
|
||||
--max-time 120 \
|
||||
--retry 5 \
|
||||
--retry-delay 0 \
|
||||
--retry-max-time 40 \
|
||||
-L "https://github.com/lay295/TwitchDownloader/releases/download/$VERSION/TwitchDownloaderCLI-$VERSION-$ARCH.zip"
|
||||
unzip twitchdownloader.zip
|
||||
chmod +x TwitchDownloaderCLI
|
||||
echo "(3/5) Smoke test"
|
||||
./TwitchDownloaderCLI --help
|
||||
cp ./TwitchDownloaderCLI /usr/local/bin/TwitchDownloaderCLI
|
||||
Reference in New Issue
Block a user