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
6666 FORCE=0
6767
6868 # do not forget to update before commit
69−VERSION=85
69+VERSION=86
7070
7171 HELP="\${cG}split2flac version: ${VERSION}
7272 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
229229
230230 # replaces a tag name with the value of the tag. $1=pattern $2=tag_name $3=tag_value
231231 update_pattern () {
232+ # replace '/' with '\'
233+ tag_name=$(echo "$2" | sed 's,/,\\\\,g')
234+ tag_value=$(echo "$3" | sed 's,/,\\\\,g')
235+
232236 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"; }
235239 }
236240
237241 # 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