Hacker News new | ask | show | jobs
by bklaasen 2049 days ago
Here's my termux-url-opener:

$ cat ~/bin/termux-url-opener #!/data/data/com.termux/files/usr/bin/env bash

read -ep "[c]ast or [d]ownload: " -i "c" choice case "${choice}" in c|C) catt cast "${1}" ;; d|D) pip install --upgrade youtube-dl cd ~/storage/movies youtube-dl "${1}" ;; *) echo "Sorry, that's invalid." exit 65 ;; esac