From 7daaa9efb7d3a2eacef72bae465a97b42e5e2590 Mon Sep 17 00:00:00 2001 From: Benjamin Lupton Date: Fri, 3 Nov 2023 22:57:36 +1000 Subject: [PATCH] setup-util-ytd: make everything optional and remove youtubedr --- commands/setup-util-ytd | 47 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/commands/setup-util-ytd b/commands/setup-util-ytd index 2c5969de6..1e9225332 100755 --- a/commands/setup-util-ytd +++ b/commands/setup-util-ytd @@ -6,27 +6,6 @@ function setup_util_wget() ( source "$DOROTHY/sources/bash.bash" - # --------------------------------- - # https://github.com/kkdai/youtube - - local options=( - --cli='youtubedr' - "$@" - GO='github.com/kkdai/youtube/v2' - # GO='github.com/kkdai/youtube/v2/cmd/youtubedr' - ) - setup-util "${options[@]}" - - # --------------------------------- - # https://github.com/iawia002/lux - - local options=( - --cli='lux' - "$@" - GO='github.com/iawia002/lux' - ) - setup-util "${options[@]}" - # --------------------------------- # https://github.com/yt-dlp/yt-dlp # https://github.com/yt-dlp/yt-dlp/wiki/Installation @@ -51,6 +30,7 @@ function setup_util_wget() ( # only use pip options=( + --optional --cli='yt-dlp' --name='yt-dlp' "$@" @@ -73,12 +53,37 @@ function setup_util_wget() ( # only use pip options=( + --optional --cli='youtube-dl' --name='youtube-dl' "$@" PIP='youtube-dl' ) setup-util "${options[@]}" + + # --------------------------------- + # https://github.com/kkdai/youtube + + # failing with: package github.com/kkdai/youtube/v2 is not a main package + # local options=( + # --optional + # --cli='youtubedr' + # "$@" + # GO='github.com/kkdai/youtube/v2' + # # GO='github.com/kkdai/youtube/v2/cmd/youtubedr' + # ) + # setup-util "${options[@]}" + + # --------------------------------- + # https://github.com/iawia002/lux + + local options=( + --optional + --cli='lux' + "$@" + GO='github.com/iawia002/lux' + ) + setup-util "${options[@]}" ) # fire if invoked standalone