summaryrefslogtreecommitdiffstats
path: root/src/inline.sh
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-03-07 20:52:29 (GMT)
committerEvan Martin <martine@danga.com>2011-03-07 20:52:29 (GMT)
commit4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795 (patch)
tree098c5b5c6b764964b252f8633752dfd4ee6e77ea /src/inline.sh
parent9d750fcd497d1762d24fbebdf903033ba4a12f90 (diff)
downloadNinja-4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795.zip
Ninja-4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795.tar.gz
Ninja-4e0e3906114c8687c9aaacdc8ea1e1c9eb29d795.tar.bz2
inline.sh: rewrite for better portability
Diffstat (limited to 'src/inline.sh')
-rwxr-xr-xsrc/inline.sh6
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 ";"