From b07edb58e18c30e4efcb54e8bbed815eb0884537 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 5 Sep 2016 15:31:26 -0400 Subject: [PATCH] flac2mp3: handle cli options --- .bin/flac2mp3 | 11 +++++++++++ 1 file changed, 11 insertions(+) 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}" | \ -- 2.39.5