diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /unix/hlib/mkmlist.csh | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'unix/hlib/mkmlist.csh')
-rwxr-xr-x | unix/hlib/mkmlist.csh | 21 |
1 files changed, 21 insertions, 0 deletions
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 '<syserr.h>' | 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] |