]> git.sesse.net Git - x264/commitdiff
Fix cltostr.sh on OS X
authorTsukasa OMOTO <henry0312@gmail.com>
Sun, 20 Jul 2014 13:17:11 +0000 (22:17 +0900)
committerFiona Glaser <fiona@x264.com>
Sun, 20 Jul 2014 18:20:34 +0000 (11:20 -0700)
tools/cltostr.sh

index c5f6c151d894921571c5608a2766a2a151304167..852ba8a7228017e760d2f3a1644cf15cef20d2d6 100755 (executable)
@@ -12,7 +12,7 @@ sanitize() {
 # Convert stdin to a \0-terminated char array.
 dump() {
     printf 'static const char %s[] = {\n' $1
-    od -v -A n -t x1 | sed 's/.\(..\)/0x\1, /g'
+    od -v -A n -t x1 | sed 's/[[:space:]]*\([[:alnum:]]\{2\}\)/0x\1, /g'
     printf '0x00 };\n'
 }