diff options
author | Evan Martin <martine@danga.com> | 2011-03-07 20:52:29 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-03-07 20:52:29 (GMT) |
commit | 4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795 (patch) | |
tree | 098c5b5c6b764964b252f8633752dfd4ee6e77ea /src/inline.sh | |
parent | 9d750fcd497d1762d24fbebdf903033ba4a12f90 (diff) | |
download | Ninja-4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795.zip Ninja-4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795.tar.gz Ninja-4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795.tar.bz2 |
inline.sh: rewrite for better portability
Diffstat (limited to 'src/inline.sh')
-rwxr-xr-x | src/inline.sh | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/inline.sh b/src/inline.sh index e32f33d..5ea082d 100755 --- a/src/inline.sh +++ b/src/inline.sh @@ -20,10 +20,6 @@ varname="$1" echo "const char $varname[] =" -IFS= -while read line; do - escaped=$(echo "$line" | sed -e 's|\\|\\\\|g; s|"|\\"|g') - echo "\"$escaped\\n\"" -done +od -t x1 -A n -v | sed -e 's| |\\x|g; s|^|"|; s|$|"|' echo ";" |