dotfiles/home/default/.local/bin/pind

5 lines
163 B
Plaintext
Raw Normal View History

#!/bin/sh
[ -z "$1" ] && echo 'usage: pind <url>' && exit 1
read url < <(curl -Ls "$1" | pup 'img attr{src}')
curl -LO --no-clobber $url && echo "$url downloaded"