aboutsummaryrefslogtreecommitdiff
path: root/unix/hlib/mkmlist.csh
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /unix/hlib/mkmlist.csh
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/hlib/mkmlist.csh')
-rwxr-xr-xunix/hlib/mkmlist.csh21
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]