diff options
Diffstat (limited to 'usr.sbin/crunchgen/mkskel.sh')
-rw-r--r-- | usr.sbin/crunchgen/mkskel.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/usr.sbin/crunchgen/mkskel.sh b/usr.sbin/crunchgen/mkskel.sh new file mode 100644 index 00000000000..9faa6e9acc9 --- /dev/null +++ b/usr.sbin/crunchgen/mkskel.sh @@ -0,0 +1,17 @@ +#! /bin/sh +# $OpenBSD: mkskel.sh,v 1.1 2008/08/22 15:18:55 deraadt Exp $ + +# 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 |