summaryrefslogtreecommitdiff
path: root/distrib/crunch/crunchgen/mkskel.sh
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-10-18 08:53:40 +0000
commitd6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch)
treeece253b876159b39c620e62b6c9b1174642e070e /distrib/crunch/crunchgen/mkskel.sh
initial import of NetBSD tree
Diffstat (limited to 'distrib/crunch/crunchgen/mkskel.sh')
-rw-r--r--distrib/crunch/crunchgen/mkskel.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/distrib/crunch/crunchgen/mkskel.sh b/distrib/crunch/crunchgen/mkskel.sh
new file mode 100644
index 00000000000..fd53d78bbba
--- /dev/null
+++ b/distrib/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