mp3car: use printf instead of echo

This commit is contained in:
Matteo Cypriani 2018-04-11 21:47:10 +02:00
parent ff3da6cdee
commit d06558144b
1 changed files with 3 additions and 5 deletions

View File

@ -15,7 +15,7 @@
# Dependencies: pacpl, lame # Dependencies: pacpl, lame
if [ $# -lt 1 ] ; then if [ $# -lt 1 ] ; then
echo "Usage: $0 <input> [input [...]]" printf 'Usage: %s <input> [input [...]]\n' "$0" >&2
exit 1 exit 1
fi fi
@ -23,11 +23,9 @@ BASEOUTDIR="$HOME/tmp/mp3car"
LAMEOPTIONS="-v -b 32 -B 128" LAMEOPTIONS="-v -b 32 -B 128"
for INPUT in "$@" ; do for INPUT in "$@" ; do
echo printf '\n*** CONVERTING "%s" ***\n' "$INPUT"
echo "*** CONVERTING \"$INPUT\" ***"
OUTDIR="$BASEOUTDIR/$(basename "$INPUT")" OUTDIR="$BASEOUTDIR/$(basename "$INPUT")"
echo "Destination directory: \"$OUTDIR\"" printf '\nDestination directory: "%s"\n\n' "$OUTDIR"
echo
mkdir -p "$OUTDIR" mkdir -p "$OUTDIR"
pacpl \ pacpl \
--to mp3 --encoder lame --defopts 0 --eopts "$LAMEOPTIONS" \ --to mp3 --encoder lame --defopts 0 --eopts "$LAMEOPTIONS" \