youtube-dl misc

This commit is contained in:
2025-01-18 00:46:27 +08:00
parent c4b2af8073
commit ebd30c8a50

View File

@@ -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" && \