diff options
Diffstat (limited to 'flactomp3')
-rwxr-xr-x | flactomp3 | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -15,5 +15,5 @@ fi dir=${1%/} copydir_suffix="_mp3" -find "$dir" -type d -exec mkdir -p ${dir}${copydir_suffix}/{} + -find "$dir" -type f -name '*.flac' -print0 | parallel -0 ffmpeg -i {} -qscale:a 0 '{=s#^([^/])(.*)\.flac$#\1'"${copydir_suffix}"'\2.mp3#=}' +# same regex twice, but different replacement pattern +find "$dir" -type f -name '*.flac' -print0 | parallel -0 echo mkdir -p '{=s#^([^/]+)(.*)/([^/]+)\.flac$#\1'"${copydir_suffix}"'\2#=}'\; echo ffmpeg -i {} -qscale:a 0 '{=s#^([^/]+)(.*)/([^/]+)\.flac$#\1'"${copydir_suffix}"'\2\3.mp3#=}' |