summaryrefslogtreecommitdiffstats
path: root/utils/file2header.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/file2header.sh')
-rwxr-xr-xutils/file2header.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/file2header.sh b/utils/file2header.sh
new file mode 100755
index 0000000..f25ae13
--- /dev/null
+++ b/utils/file2header.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "const char *$2 ="
+cat $1|sed 's/\\/\\\\/g'|sed 's/"/\\"/g'|sed 's/^/\"/'|sed 's/$/\\n\"/'
+echo ";"