diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /unix/hlib/mkmlist.csh | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
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] |