diff options
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/curlncm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/.local/bin/curlncm b/.local/bin/curlncm index 5056b2de..7a9955f6 100755 --- a/.local/bin/curlncm +++ b/.local/bin/curlncm @@ -18,6 +18,7 @@ die () } # let a i r mutually exclusive, can improve by chain ids +# need to add usage help message after improvements # artist, song, djradio id flag=0 while getopts a:i:r: opt; do @@ -34,8 +35,8 @@ while getopts a:i:r: opt; do \?) exit 1;; esac done -shift $((OPTIND-1)) [ $flag -eq 0 ] && die "please specify at least one option" +shift $((OPTIND-1)) [ $# -gt 1 ] && die "directory name should be at the end" download_dir="${1:-"$PWD"}" [ -d "$download_dir" ] || mkdir -p "$download_dir" |