aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/crunch/crunchgen/mkskel.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/crunch/crunchgen/mkskel.sh')
-rwxr-xr-xcontrib/crunch/crunchgen/mkskel.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/crunch/crunchgen/mkskel.sh b/contrib/crunch/crunchgen/mkskel.sh
new file mode 100755
index 000000000000..fd53d78bbbac
--- /dev/null
+++ b/contrib/crunch/crunchgen/mkskel.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+# idea and sed lines taken straight from flex
+
+cat <<!EOF
+/* File created via mkskel.sh */
+
+char *crunched_skel[] = {
+!EOF
+
+sed 's/\\/&&/g' $* | sed 's/"/\\"/g' | sed 's/.*/ "&",/'
+
+cat <<!EOF
+ 0
+};
+!EOF