[+] Add interactive Command Line in youtube-downloder

This commit is contained in:
Simon Rieger 2022-04-28 11:14:26 +02:00
parent 1cf4ddf405
commit e522e9dd0d

View file

@ -2,7 +2,7 @@
set -ex
if [ "$1" == "--help" ] || [[ -z "$1" ]]
if [ "$1" == "--help" ]
then
echo "bash ./youtube-dl.sh URL FORMAT"
echo "Formate: [opus/m4a/video/hd/fullhd/4k]"
@ -12,6 +12,9 @@ fi
url="$1"
format="$2"
[[ -z "${url}" ]] && read -p "URL: " url
[[ -z "${format}" ]] && read -p "Format [opus/m4a/video/hd/fullhd/4k]: " format
if [ "$format" == "opus" ]
then
format="--audio-format opus"