lil-bits/download-youtube

15 lines
308 B
Plaintext
Raw Normal View History

2020-10-12 12:55:59 -05:00
#!/bin/sh
cd ~/Downloads
YTDL_WD="."
if [ $(command -v zenity) ]; then
YTDL_WD=$(zenity --file-selection --directory --filename=.)
fi
if [ $(command -v xfce4-terminal) ]; then
xfce4-terminal --default-working-directory "$YTDL_WD" --execute youtube-dl $@
else
cd "$YTDL_WD"
youtube-dl $@
fi