345f3efe8a
Closes #42695. Signed-off-by: Chongyu Zhu <i@lembacon.com>
27 lines
990 B
Ruby
27 lines
990 B
Ruby
class YoutubeDl < Formula
|
|
desc "Download YouTube videos from the command-line"
|
|
homepage "https://ytdl-org.github.io/youtube-dl/"
|
|
url "https://github.com/ytdl-org/youtube-dl/releases/download/2019.08.02/youtube-dl-2019.08.02.tar.gz"
|
|
sha256 "573c37add3e6107bf0c3c8ce43443bb788957d7bfb5e736cee6b32e3b2342b80"
|
|
|
|
head do
|
|
url "https://github.com/ytdl-org/youtube-dl.git"
|
|
depends_on "pandoc" => :build
|
|
end
|
|
|
|
bottle :unneeded
|
|
|
|
def install
|
|
system "make", "PREFIX=#{prefix}" if build.head?
|
|
bin.install "youtube-dl"
|
|
man1.install "youtube-dl.1"
|
|
bash_completion.install "youtube-dl.bash-completion"
|
|
zsh_completion.install "youtube-dl.zsh" => "_youtube-dl"
|
|
fish_completion.install "youtube-dl.fish"
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/youtube-dl", "--simulate", "https://www.youtube.com/watch?v=he2a4xK8ctk"
|
|
system "#{bin}/youtube-dl", "--simulate", "--yes-playlist", "https://www.youtube.com/watch?v=iCkYw3cRwLo&list=LLnHXLLNHjNAnDQ50JANLG1g"
|
|
end
|
|
end
|