~yerinalexey/dotfiles

c97520ae3d249ef00c5570e7c540c1b1c290c3a1 — Alexey Yerin a month ago 29c1a41
dl-music: default to $(wl-paste) on no argument
1 files changed, 2 insertions(+), 2 deletions(-)

M scripts/dl-music
M scripts/dl-music => scripts/dl-music +2 -2
@@ 7,8 7,8 @@ MUSIC_DIRECTORY="$HOME"/music
video_url="$1"

if [ -z "$video_url" ]; then
	printf "Usage: dl-music <video url>\n"
	exit 1
	printf "Warning: defaulting video URL to \$(wl-paste)\n" >&2
	video_url="$(wl-paste)"
fi

video_title="$(youtube-dl --get-title "$video_url" | sed 's/\s*\[NCS Release\]\s*//g')"