History

replace slash with a backslash inside tags. Fixes issue 11

Serge Zirukin committed 15 years ago

Commit 3c131911 parent 13307651 file · +7 −3Browse files

Unified · Split

split2flac.sh+7−3
@@ -66,7 +66,7 @@ unset PIC INPATH CUE CHARSET · 65 unmodified lines
66FORCE=066FORCE=0
67 67
68# do not forget to update before commit68# do not forget to update before commit
69VERSION=8569VERSION=86
70 70
71HELP="\${cG}split2flac version: ${VERSION}71HELP="\${cG}split2flac version: ${VERSION}
72Splits 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.72Splits 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# replaces a tag name with the value of the tag. $1=pattern $2=tag_name $3=tag_value230# replaces a tag name with the value of the tag. $1=pattern $2=tag_name $3=tag_value
231update_pattern () {231update_pattern () {
232 # replace '/' with '\'
233 tag_name=$(echo "$2" | sed 's,/,\\\\,g')
234 tag_value=$(echo "$3" | sed 's,/,\\\\,g')
235
232 echo "$1" | { [ "$3" ] \236 echo "$1" | { [ "$3" ] \
233 && sed "s/[{]@$2\([^}]*\)[}]/$3\1/g;s/@$2/$3/g" \237 && sed "s/[{]@${tag_name}\([^}]*\)[}]/${tag_value}\1/g;s/@${tag_name}/${tag_value}/g" \
234 || sed "s/[{]@$2\([^}]*\)[}]//g;s/@$2//g"; }238 || sed "s/[{]@${tag_name}\([^}]*\)[}]//g;s/@${tag_name}//g"; }
235}239}
236 240
237# splits a file241# splits a file

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t