From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- unix/hlib/mkmlist.csh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 unix/hlib/mkmlist.csh (limited to 'unix/hlib/mkmlist.csh') diff --git a/unix/hlib/mkmlist.csh b/unix/hlib/mkmlist.csh new file mode 100755 index 00000000..e4435916 --- /dev/null +++ b/unix/hlib/mkmlist.csh @@ -0,0 +1,21 @@ +#! /bin/csh +# MKMLIST -- Make a library member list on the standard output, e.g., for +# inclusion in a MKPKG file. + +# try to protect people from themselves... +unalias ls ex rm grep sed sort uniq cat + +ls *.[xfcs] > _ml1 +grep '^include' *.x >> _ml1 + +grep -v '#' _ml1 | grep -v '' | sort | uniq |\ + sed -e 's/^.*include./ /' | sed -e 's/\"//g' |\ + sed -e 's/\.x/.x /' > _ml2 + +ex - << 'EOC' _ml2 +g/^ / .-1,.j +1,$s/^/ / +wq +'EOC' + +cat _ml2; rm _ml[12] -- cgit