commit 7ea5e64b3ea37626e2dd37766452613ed53eff48 parent 92f6a83109c63017e549b939d1c7125a40778dc3 Author: gearsix <gearsix@tuta.io> Date: Thu, 12 Jan 2023 13:21:43 +0000 fixed flac2mp3 for sh Diffstat:
M | src/posix/flac2mp3.sh | | | 7 | +++---- |
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/posix/flac2mp3.sh b/src/posix/flac2mp3.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # flac2mp3 # description: converts .flac files ($1...$n) to .mp3 files # e.g.$ flac2mp3 ./album @@ -13,7 +13,6 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then exit fi -for file in $1/*.flac; do - ffmpeg -i "$file" -qscale:a 0 "${file[@]/%flac/mp3}" +for file in "$1"/*.flac; do + ffmpeg -i "$file" -qscale:a 0 "${file%.flac}".mp3 done -