Unified · Split
| @@ -66,7 +66,7 @@ unset PIC INPATH CUE CHARSET · 65 unmodified lines | ||
| 66 | 66 | FORCE=0 |
| 67 | 67 | |
| 68 | 68 | # do not forget to update before commit |
| 69 | −VERSION=85 | |
| 69 | +VERSION=86 | |
| 70 | 70 | |
| 71 | 71 | HELP="\${cG}split2flac version: ${VERSION} |
| 72 | 72 | Splits one big \${cU}APE/FLAC/WV/WAV\$cZ\$cG audio image (or a collection) into \${cU}FLAC/M4A/MP3/OGG_VORBIS/WAV\$cZ\$cG tracks with tagging and renaming. |
| @@ -229,9 +229,13 @@ $msg "${cG}Output dir :$cZ ${DIR:?Output directory was not set}\n" · 156 unmodified lines | ||
| 229 | 229 | |
| 230 | 230 | # replaces a tag name with the value of the tag. $1=pattern $2=tag_name $3=tag_value |
| 231 | 231 | update_pattern () { |
| 232 | + # replace '/' with '\' | |
| 233 | + tag_name=$(echo "$2" | sed 's,/,\\\\,g') | |
| 234 | + tag_value=$(echo "$3" | sed 's,/,\\\\,g') | |
| 235 | + | |
| 232 | 236 | echo "$1" | { [ "$3" ] \ |
| 233 | − && sed "s/[{]@$2\([^}]*\)[}]/$3\1/g;s/@$2/$3/g" \ | |
| 234 | − || sed "s/[{]@$2\([^}]*\)[}]//g;s/@$2//g"; } | |
| 237 | + && sed "s/[{]@${tag_name}\([^}]*\)[}]/${tag_value}\1/g;s/@${tag_name}/${tag_value}/g" \ | |
| 238 | + || sed "s/[{]@${tag_name}\([^}]*\)[}]//g;s/@${tag_name}//g"; } | |
| 235 | 239 | } |
| 236 | 240 | |
| 237 | 241 | # splits a file |