-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ytd-helper/setup-util-ytd: extract into individual installers, enable…
… tool section
- Loading branch information
Showing
5 changed files
with
159 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
function setup_util_lux() ( | ||
source "$DOROTHY/sources/bash.bash" | ||
|
||
# improve performance | ||
if is-needle --quiet "$@" && ! is-needle --upgrade "$@" && ! is-needle --uninstall "$@" && command-exists lux; then | ||
return 0 | ||
fi | ||
|
||
# setup | ||
local options=( | ||
--cli='lux' | ||
"$@" | ||
GO='github.com/iawia002/lux' | ||
) | ||
setup-util "${options[@]}" | ||
) | ||
|
||
# fire if invoked standalone | ||
if test "$0" = "${BASH_SOURCE[0]}"; then | ||
setup_util_lux "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
# https://github.com/ytdl-org/youtube-dl | ||
|
||
function setup_util_youtube_dl() ( | ||
source "$DOROTHY/sources/bash.bash" | ||
|
||
# don't improve performance, as we want to ensure correct cli | ||
|
||
# only support pip, as others are buggy, so uninstall the rest | ||
local options=( | ||
--uninstall | ||
--quiet | ||
--name='youtube-dl' | ||
BREW='youtube-dl' | ||
) | ||
setup-util "${options[@]}" | ||
|
||
# only use pip | ||
options=( | ||
--optional | ||
--cli='youtube-dl' | ||
--name='youtube-dl' | ||
"$@" | ||
PIP='youtube-dl' | ||
) | ||
setup-util "${options[@]}" | ||
|
||
) | ||
|
||
# fire if invoked standalone | ||
if test "$0" = "${BASH_SOURCE[0]}"; then | ||
setup_util_youtube_dl "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# https://github.com/yt-dlp/yt-dlp | ||
# https://github.com/yt-dlp/yt-dlp/wiki/Installation | ||
|
||
function setup_util_ytd_dlp() ( | ||
source "$DOROTHY/sources/bash.bash" | ||
|
||
# don't improve performance, as we want to ensure correct cli | ||
|
||
# only support pip, as others are buggy, so uninstall the rest | ||
local options=( | ||
--uninstall | ||
--quiet | ||
--name='yt-dlp' | ||
BREW='yt-dlp' | ||
AUR='yt-dlp' # ARCH | ||
APT_REPO='ppa:yt-dlp/stable' | ||
APT='yt-dlp' # UBUNTU | ||
PORT='yt-dlp' | ||
SCOOP='yt-dlp' | ||
CHOCO='yt-dlp' | ||
WINGET='yt-dlp' | ||
PKG='yt-dlp' | ||
) | ||
setup-util "${options[@]}" | ||
|
||
# only use pip | ||
options=( | ||
--optional | ||
--cli='yt-dlp' | ||
--name='yt-dlp' | ||
"$@" | ||
PIP='yt-dlp' | ||
) | ||
setup-util "${options[@]}" | ||
) | ||
|
||
# fire if invoked standalone | ||
if test "$0" = "${BASH_SOURCE[0]}"; then | ||
setup_util_ytd_dlp "$@" | ||
fi |
This file was deleted.
Oops, something went wrong.