From ebd30c8a507b3b425adf6b91885b3a61954f1848 Mon Sep 17 00:00:00 2001 From: AnthonyAxenov Date: Sat, 18 Jan 2025 00:46:27 +0800 Subject: [PATCH] youtube-dl misc --- install/youtube-dl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/youtube-dl b/install/youtube-dl index 4276fe0..8fd72ca 100755 --- a/install/youtube-dl +++ b/install/youtube-dl @@ -23,7 +23,12 @@ installed() { mkdir -p "$HOME/install/youtube-dl" "$HOME/.local/bin" if installed git; then - git clone https://github.com/ytdl-org/youtube-dl.git "$HOME/install/youtube-dl" --depth=1 --single-branch + if [[ -d "$HOME/install/youtube-dl" ]]; then + cd "$HOME/install/youtube-dl" + git pull + else + git clone https://github.com/ytdl-org/youtube-dl.git "$HOME/install/youtube-dl" --depth=1 --single-branch + fi else ! installed wget && sudo apt install -y wget wget https://github.com/ytdl-org/youtube-dl/archive/refs/heads/master.zip -O "$HOME/install/youtube-dl.zip" && \