From: Mike Frysinger Date: Mon, 5 Sep 2016 19:31:26 +0000 (-0400) Subject: flac2mp3: handle cli options X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b07edb58e18c30e4efcb54e8bbed815eb0884537;p=home.git flac2mp3: handle cli options --- diff --git a/.bin/flac2mp3 b/.bin/flac2mp3 index 4be5834..d6fe324 100755 --- a/.bin/flac2mp3 +++ b/.bin/flac2mp3 @@ -1,11 +1,22 @@ #!/bin/bash +usage() { + cat <<-EOF +Usage: $0 [files] +EOF + exit +} + maxj=`getconf _NPROCESSORS_ONLN` jobs=() [[ $# -eq 0 ]] && set -- *.flac for f in "$@" ; do + case ${f} in + -*) usage ;; + esac + m="${f%.flac}.mp3" ( flac -sdc "${f}" | \