From e7e21a749311a8f8276593642f0f5499905410d0 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 4 Jun 2020 19:56:13 -0400 Subject: get_youtube-dl() --- dot/bashrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dot/bashrc') diff --git a/dot/bashrc b/dot/bashrc index 2e4ed5d..536bf50 100644 --- a/dot/bashrc +++ b/dot/bashrc @@ -413,6 +413,19 @@ install_spacemacs() fi } +get_youtube-dl() +{ + local u url + if u=$(which youtube-dl) + then + "$u" -U + else + url=https://youtube-dl.org/downloads/latest/youtube-dl + sudo curl -L "$url" -o /usr/local/bin/youtube-dl + sudo chmod a+rx /usr/local/bin/youtube-dl + fi +} + local_bashrc=~/.bashrc.$(hostname) if [ -f "$local_bashrc" ]; then -- cgit v1.2.3