aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /util
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'util')
-rw-r--r--util/.patch_release0
-rw-r--r--util/.release_date0
-rw-r--r--util/.repo_desc27
-rw-r--r--util/.repo_local209
-rw-r--r--util/.repo_manifest209
-rw-r--r--util/.repo_pkgs23
-rw-r--r--util/.version1
-rw-r--r--util/.zzsetenv.def1
-rw-r--r--util/README19
-rwxr-xr-xutil/check_update77
-rwxr-xr-xutil/chk6417
-rwxr-xr-xutil/fget184
-rwxr-xr-xutil/iraf_latest114
-rwxr-xr-xutil/iraf_update109
-rwxr-xr-xutil/mkarch78
-rwxr-xr-xutil/mkbindist75
-rwxr-xr-xutil/mkclean111
-rwxr-xr-xutil/mkdist26
-rwxr-xr-xutil/mkproto123
-rwxr-xr-xutil/mksrc105
-rwxr-xr-xutil/mksysgen79
-rwxr-xr-xutil/mkup41
-rwxr-xr-xutil/mkupx25
-rwxr-xr-xutil/pkgall13
-rwxr-xr-xutil/pkgclean88
-rwxr-xr-xutil/pkgconfig101
-rwxr-xr-xutil/pkgdel25
-rwxr-xr-xutil/pkgenv16
-rwxr-xr-xutil/pkgget177
-rwxr-xr-xutil/pkginit53
-rwxr-xr-xutil/pkginst97
-rwxr-xr-xutil/pkgrepo13
-rwxr-xr-xutil/pkgupdate121
-rwxr-xr-xutil/self_update58
34 files changed, 2415 insertions, 0 deletions
diff --git a/util/.patch_release b/util/.patch_release
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/util/.patch_release
diff --git a/util/.release_date b/util/.release_date
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/util/.release_date
diff --git a/util/.repo_desc b/util/.repo_desc
new file mode 100644
index 00000000..0658e86d
--- /dev/null
+++ b/util/.repo_desc
@@ -0,0 +1,27 @@
+#
+# Pkg Deps Description
+
+adccdrom none ADC CD-ROM tools
+cfh12k mscred,fitsutil CFHT 12K reductions
+ctio none CTIO tools
+deitab none DEIMOS tables package
+esowfi mscred,fitsutil ESO WFI reductions
+fitsutil none FITS utilities
+guiapps none Prototype GUI application
+iue none IUE reduction package
+mem0 none Maximum Entropy deconvolution
+mscred fitsutil Mosaic CCD reduction package
+mtools none Jeff Munn's utility package
+nfextern none General IR reductions/NEWFIRM package
+nfdat_ctio nfextern Calibration data for NEWFIRM at CTIO
+optic mscred,fitsutil OPTIC reductions
+rvsao none SAO's RV package
+song none SONG reductions
+sqiid none SQIID reductions
+stecf none ST-ECF v1.5
+steward none Steward Observatory tools
+stsdas tables STSDAS v3.12 - HST reduction tools
+tables none TABLES v3.12 - Tables utilities
+ucsclris none UCSC LRIS mask making
+upsqiid none UPiated SQIID reductions
+xdimsum none IR reductions
diff --git a/util/.repo_local b/util/.repo_local
new file mode 100644
index 00000000..b588ef7a
--- /dev/null
+++ b/util/.repo_local
@@ -0,0 +1,209 @@
+# Arch Pkg Epoch File
+#
+ linux64 adccdrom 1339696737 adccdrom-linux64.tar.gz
+ linux adccdrom 1339696737 adccdrom-linux.tar.gz
+ redhat adccdrom 1339696738 adccdrom-src.tar.gz
+ macintel adccdrom 1339696735 adccdrom-macintel.tar.gz
+ macosx adccdrom 1339696736 adccdrom-macosx.tar.gz
+ ssun adccdrom 1339696738 adccdrom-src.tar.gz
+ sparc adccdrom 1339696738 adccdrom-src.tar.gz
+ freebsd adccdrom 1339696738 adccdrom-src.tar.gz
+ sunos adccdrom 1339696738 adccdrom-src.tar.gz
+ linux64 cfh12k 1332309566 cfh12k-universal.tar.gz
+ linux cfh12k 1332309566 cfh12k-universal.tar.gz
+ redhat cfh12k 1332309566 cfh12k-universal.tar.gz
+ macintel cfh12k 1332309566 cfh12k-universal.tar.gz
+ macosx cfh12k 1332309566 cfh12k-universal.tar.gz
+ ssun cfh12k 1332309566 cfh12k-universal.tar.gz
+ sparc cfh12k 1332309566 cfh12k-universal.tar.gz
+ freebsd cfh12k 1332309566 cfh12k-universal.tar.gz
+ sunos cfh12k 1332309566 cfh12k-universal.tar.gz
+ linux64 ctio 1339696753 ctio-linux64.tar.gz
+ linux ctio 1339696757 ctio-linux.tar.gz
+ redhat ctio 1339696759 ctio-src.tar.gz
+ macintel ctio 1339696741 ctio-macintel.tar.gz
+ macosx ctio 1339696747 ctio-macosx.tar.gz
+ ssun ctio 1339696759 ctio-src.tar.gz
+ sparc ctio 1339696759 ctio-src.tar.gz
+ freebsd ctio 1339696759 ctio-src.tar.gz
+ sunos ctio 1339696759 ctio-src.tar.gz
+ linux64 deitab 1339696765 deitab-linux64.tar.gz
+ linux deitab 1339696767 deitab-linux.tar.gz
+ redhat deitab 1339696768 deitab-src.tar.gz
+ macintel deitab 1339696760 deitab-macintel.tar.gz
+ macosx deitab 1339696762 deitab-macosx.tar.gz
+ ssun deitab 1339696768 deitab-src.tar.gz
+ sparc deitab 1339696768 deitab-src.tar.gz
+ freebsd deitab 1339696768 deitab-src.tar.gz
+ sunos deitab 1339696768 deitab-src.tar.gz
+ linux64 esowfi 1332309566 esowfi-universal.tar.gz
+ linux esowfi 1332309566 esowfi-universal.tar.gz
+ redhat esowfi 1332309566 esowfi-universal.tar.gz
+ macintel esowfi 1332309566 esowfi-universal.tar.gz
+ macosx esowfi 1332309566 esowfi-universal.tar.gz
+ ssun esowfi 1332309566 esowfi-universal.tar.gz
+ sparc esowfi 1332309566 esowfi-universal.tar.gz
+ freebsd esowfi 1332309566 esowfi-universal.tar.gz
+ sunos esowfi 1332309566 esowfi-universal.tar.gz
+ linux64 fitsutil 1349560963 fitsutil-linux64.tar.gz
+ linux fitsutil 1349560969 fitsutil-linux.tar.gz
+ redhat fitsutil 1349560974 fitsutil-src.tar.gz
+ macintel fitsutil 1349560948 fitsutil-macintel.tar.gz
+ macosx fitsutil 1349560956 fitsutil-macosx.tar.gz
+ ssun fitsutil 1349560974 fitsutil-src.tar.gz
+ sparc fitsutil 1349560974 fitsutil-src.tar.gz
+ freebsd fitsutil 1349560974 fitsutil-src.tar.gz
+ sunos fitsutil 1349560974 fitsutil-src.tar.gz
+ linux64 guiapps 1339696827 guiapps-linux64.tar.gz
+ linux guiapps 1339696837 guiapps-linux.tar.gz
+ redhat guiapps 1339696843 guiapps-src.tar.gz
+ macintel guiapps 1339696808 guiapps-macintel.tar.gz
+ macosx guiapps 1339696817 guiapps-macosx.tar.gz
+ ssun guiapps 1339696843 guiapps-src.tar.gz
+ sparc guiapps 1339696843 guiapps-src.tar.gz
+ freebsd guiapps 1339696843 guiapps-src.tar.gz
+ sunos guiapps 1339696843 guiapps-src.tar.gz
+ linux64 mem0 1339696846 mem0-linux64.tar.gz
+ linux mem0 1339696847 mem0-linux.tar.gz
+ redhat mem0 1339696847 mem0-src.tar.gz
+ macintel mem0 1339696844 mem0-macintel.tar.gz
+ macosx mem0 1339696845 mem0-macosx.tar.gz
+ ssun mem0 1339696847 mem0-src.tar.gz
+ sparc mem0 1339696847 mem0-src.tar.gz
+ freebsd mem0 1339696847 mem0-src.tar.gz
+ sunos mem0 1339696847 mem0-src.tar.gz
+ linux64 mscdb 1339696652 mscdb-universal.tar.gz
+ linux mscdb 1339696652 mscdb-universal.tar.gz
+ redhat mscdb 1339696652 mscdb-universal.tar.gz
+ macintel mscdb 1339696652 mscdb-universal.tar.gz
+ macosx mscdb 1339696652 mscdb-universal.tar.gz
+ ssun mscdb 1339696652 mscdb-universal.tar.gz
+ sparc mscdb 1339696652 mscdb-universal.tar.gz
+ freebsd mscdb 1339696652 mscdb-universal.tar.gz
+ sunos mscdb 1339696652 mscdb-universal.tar.gz
+ linux64 mscred 1344481579 mscred-linux64.tar.gz
+ linux mscred 1344481562 mscred-linux.tar.gz
+ redhat mscred 1344481589 mscred-src.tar.gz
+ macintel mscred 1344481524 mscred-macintel.tar.gz
+ macosx mscred 1344481543 mscred-macosx.tar.gz
+ ssun mscred 1344481589 mscred-src.tar.gz
+ sparc mscred 1344481589 mscred-src.tar.gz
+ freebsd mscred 1344481589 mscred-src.tar.gz
+ sunos mscred 1344481589 mscred-src.tar.gz
+ linux64 mtools 1339696859 mtools-linux64.tar.gz
+ linux mtools 1339696862 mtools-linux.tar.gz
+ redhat mtools 1339696863 mtools-src.tar.gz
+ macintel mtools 1339696850 mtools-macintel.tar.gz
+ macosx mtools 1339696855 mtools-macosx.tar.gz
+ ssun mtools 1339696863 mtools-src.tar.gz
+ sparc mtools 1339696863 mtools-src.tar.gz
+ freebsd mtools 1339696863 mtools-src.tar.gz
+ sunos mtools 1339696863 mtools-src.tar.gz
+ linux64 nfextern 1369155500 nfextern-linux64.tar.gz
+ linux nfextern 1369155452 nfextern-linux.tar.gz
+ redhat nfextern 1369155644 nfextern-src.tar.gz
+ macintel nfextern 1369155552 nfextern-macintel.tar.gz
+ macosx nfextern 1369155603 nfextern-macosx.tar.gz
+ ssun nfextern 1332311037 nfextern-ssun.tar.gz
+ sparc nfextern 1369155644 nfextern-src.tar.gz
+ freebsd nfextern 1369155644 nfextern-src.tar.gz
+ sunos nfextern 1369155644 nfextern-src.tar.gz
+ linux64 optic 1332309566 optic-universal.tar.gz
+ linux optic 1332309566 optic-universal.tar.gz
+ redhat optic 1332309566 optic-universal.tar.gz
+ macintel optic 1332309566 optic-universal.tar.gz
+ macosx optic 1332309566 optic-universal.tar.gz
+ ssun optic 1332309566 optic-universal.tar.gz
+ sparc optic 1332309566 optic-universal.tar.gz
+ freebsd optic 1332309566 optic-universal.tar.gz
+ sunos optic 1332309566 optic-universal.tar.gz
+ linux64 patch 1337903759 patch-src.tar.gz
+ linux patch 1337903759 patch-src.tar.gz
+ redhat patch 1337903759 patch-src.tar.gz
+ macintel patch 1337903759 patch-src.tar.gz
+ macosx patch 1337903759 patch-src.tar.gz
+ ssun patch 1337903759 patch-src.tar.gz
+ sparc patch 1337903759 patch-src.tar.gz
+ freebsd patch 1337903759 patch-src.tar.gz
+ sunos patch 1337903759 patch-src.tar.gz
+ linux64 rvsao 1322067222 rvsao-redhat.tar.gz
+ linux rvsao 1322067222 rvsao-redhat.tar.gz
+ redhat rvsao 1322067222 rvsao-redhat.tar.gz
+ macintel rvsao 1322067226 rvsao-macosx.tar.gz
+ macosx rvsao 1322067226 rvsao-macosx.tar.gz
+ ssun rvsao 1322067223 rvsao-ssun.tar.gz
+ sparc rvsao 1322067228 rvsao-src.tar.gz
+ freebsd rvsao 1322067228 rvsao-src.tar.gz
+ sunos rvsao 1322067228 rvsao-src.tar.gz
+ linux64 song 1332309566 song-universal.tar.gz
+ linux song 1332309566 song-universal.tar.gz
+ redhat song 1332309566 song-universal.tar.gz
+ macintel song 1332309566 song-universal.tar.gz
+ macosx song 1332309566 song-universal.tar.gz
+ ssun song 1332309566 song-universal.tar.gz
+ sparc song 1332309566 song-universal.tar.gz
+ freebsd song 1332309566 song-universal.tar.gz
+ sunos song 1332309566 song-universal.tar.gz
+ linux64 sqiid 1332309566 sqiid-universal.tar.gz
+ linux sqiid 1332309566 sqiid-universal.tar.gz
+ redhat sqiid 1332309566 sqiid-universal.tar.gz
+ macintel sqiid 1332309566 sqiid-universal.tar.gz
+ macosx sqiid 1332309566 sqiid-universal.tar.gz
+ ssun sqiid 1332309566 sqiid-universal.tar.gz
+ sparc sqiid 1332309566 sqiid-universal.tar.gz
+ freebsd sqiid 1332309566 sqiid-universal.tar.gz
+ sunos sqiid 1332309566 sqiid-universal.tar.gz
+ linux64 stecf 1344881975 stecf-linux.tar.gz
+ linux stecf 1344881975 stecf-linux.tar.gz
+ redhat stecf 1344881976 stecf-src.tar.gz
+ macintel stecf 1344881973 stecf-macosx.tar.gz
+ macosx stecf 1344881973 stecf-macosx.tar.gz
+ ssun stecf 1344881976 stecf-src.tar.gz
+ sparc stecf 1344881976 stecf-src.tar.gz
+ freebsd stecf 1344881976 stecf-src.tar.gz
+ sunos stecf 1344881976 stecf-src.tar.gz
+ linux64 stsdas 1344881903 stsdas-linux.tar.gz
+ linux stsdas 1344881903 stsdas-linux.tar.gz
+ redhat stsdas 1344881948 stsdas-src.tar.gz
+ macintel stsdas 1344881815 stsdas-macosx.tar.gz
+ macosx stsdas 1344881815 stsdas-macosx.tar.gz
+ ssun stsdas 1344881948 stsdas-src.tar.gz
+ sparc stsdas 1344881948 stsdas-src.tar.gz
+ freebsd stsdas 1344881948 stsdas-src.tar.gz
+ sunos stsdas 1344881948 stsdas-src.tar.gz
+ linux64 tables 1344881966 tables-linux.tar.gz
+ linux tables 1344881966 tables-linux.tar.gz
+ redhat tables 1344881971 tables-src.tar.gz
+ macintel tables 1344881959 tables-macosx.tar.gz
+ macosx tables 1344881959 tables-macosx.tar.gz
+ ssun tables 1344881971 tables-src.tar.gz
+ sparc tables 1344881971 tables-src.tar.gz
+ freebsd tables 1344881971 tables-src.tar.gz
+ sunos tables 1344881971 tables-src.tar.gz
+ linux64 ucsclris 1339696867 ucsclris-linux64.tar.gz
+ linux ucsclris 1339696867 ucsclris-linux.tar.gz
+ redhat ucsclris 1339696868 ucsclris-src.tar.gz
+ macintel ucsclris 1339696864 ucsclris-macintel.tar.gz
+ macosx ucsclris 1339696865 ucsclris-macosx.tar.gz
+ ssun ucsclris 1339696868 ucsclris-src.tar.gz
+ sparc ucsclris 1339696868 ucsclris-src.tar.gz
+ freebsd ucsclris 1339696868 ucsclris-src.tar.gz
+ sunos ucsclris 1339696868 ucsclris-src.tar.gz
+ linux64 upsqiid 1332309566 upsqiid-universal.tar.gz
+ linux upsqiid 1332309566 upsqiid-universal.tar.gz
+ redhat upsqiid 1332309566 upsqiid-universal.tar.gz
+ macintel upsqiid 1332309566 upsqiid-universal.tar.gz
+ macosx upsqiid 1332309566 upsqiid-universal.tar.gz
+ ssun upsqiid 1332309566 upsqiid-universal.tar.gz
+ sparc upsqiid 1332309566 upsqiid-universal.tar.gz
+ freebsd upsqiid 1332309566 upsqiid-universal.tar.gz
+ sunos upsqiid 1332309566 upsqiid-universal.tar.gz
+ linux64 xdimsum 1339696873 xdimsum-linux64.tar.gz
+ linux xdimsum 1339696874 xdimsum-linux.tar.gz
+ redhat xdimsum 1339696874 xdimsum-src.tar.gz
+ macintel xdimsum 1339696869 xdimsum-macintel.tar.gz
+ macosx xdimsum 1339696871 xdimsum-macosx.tar.gz
+ ssun xdimsum 1339696874 xdimsum-src.tar.gz
+ sparc xdimsum 1339696874 xdimsum-src.tar.gz
+ freebsd xdimsum 1339696874 xdimsum-src.tar.gz
+ sunos xdimsum 1339696874 xdimsum-src.tar.gz
diff --git a/util/.repo_manifest b/util/.repo_manifest
new file mode 100644
index 00000000..b588ef7a
--- /dev/null
+++ b/util/.repo_manifest
@@ -0,0 +1,209 @@
+# Arch Pkg Epoch File
+#
+ linux64 adccdrom 1339696737 adccdrom-linux64.tar.gz
+ linux adccdrom 1339696737 adccdrom-linux.tar.gz
+ redhat adccdrom 1339696738 adccdrom-src.tar.gz
+ macintel adccdrom 1339696735 adccdrom-macintel.tar.gz
+ macosx adccdrom 1339696736 adccdrom-macosx.tar.gz
+ ssun adccdrom 1339696738 adccdrom-src.tar.gz
+ sparc adccdrom 1339696738 adccdrom-src.tar.gz
+ freebsd adccdrom 1339696738 adccdrom-src.tar.gz
+ sunos adccdrom 1339696738 adccdrom-src.tar.gz
+ linux64 cfh12k 1332309566 cfh12k-universal.tar.gz
+ linux cfh12k 1332309566 cfh12k-universal.tar.gz
+ redhat cfh12k 1332309566 cfh12k-universal.tar.gz
+ macintel cfh12k 1332309566 cfh12k-universal.tar.gz
+ macosx cfh12k 1332309566 cfh12k-universal.tar.gz
+ ssun cfh12k 1332309566 cfh12k-universal.tar.gz
+ sparc cfh12k 1332309566 cfh12k-universal.tar.gz
+ freebsd cfh12k 1332309566 cfh12k-universal.tar.gz
+ sunos cfh12k 1332309566 cfh12k-universal.tar.gz
+ linux64 ctio 1339696753 ctio-linux64.tar.gz
+ linux ctio 1339696757 ctio-linux.tar.gz
+ redhat ctio 1339696759 ctio-src.tar.gz
+ macintel ctio 1339696741 ctio-macintel.tar.gz
+ macosx ctio 1339696747 ctio-macosx.tar.gz
+ ssun ctio 1339696759 ctio-src.tar.gz
+ sparc ctio 1339696759 ctio-src.tar.gz
+ freebsd ctio 1339696759 ctio-src.tar.gz
+ sunos ctio 1339696759 ctio-src.tar.gz
+ linux64 deitab 1339696765 deitab-linux64.tar.gz
+ linux deitab 1339696767 deitab-linux.tar.gz
+ redhat deitab 1339696768 deitab-src.tar.gz
+ macintel deitab 1339696760 deitab-macintel.tar.gz
+ macosx deitab 1339696762 deitab-macosx.tar.gz
+ ssun deitab 1339696768 deitab-src.tar.gz
+ sparc deitab 1339696768 deitab-src.tar.gz
+ freebsd deitab 1339696768 deitab-src.tar.gz
+ sunos deitab 1339696768 deitab-src.tar.gz
+ linux64 esowfi 1332309566 esowfi-universal.tar.gz
+ linux esowfi 1332309566 esowfi-universal.tar.gz
+ redhat esowfi 1332309566 esowfi-universal.tar.gz
+ macintel esowfi 1332309566 esowfi-universal.tar.gz
+ macosx esowfi 1332309566 esowfi-universal.tar.gz
+ ssun esowfi 1332309566 esowfi-universal.tar.gz
+ sparc esowfi 1332309566 esowfi-universal.tar.gz
+ freebsd esowfi 1332309566 esowfi-universal.tar.gz
+ sunos esowfi 1332309566 esowfi-universal.tar.gz
+ linux64 fitsutil 1349560963 fitsutil-linux64.tar.gz
+ linux fitsutil 1349560969 fitsutil-linux.tar.gz
+ redhat fitsutil 1349560974 fitsutil-src.tar.gz
+ macintel fitsutil 1349560948 fitsutil-macintel.tar.gz
+ macosx fitsutil 1349560956 fitsutil-macosx.tar.gz
+ ssun fitsutil 1349560974 fitsutil-src.tar.gz
+ sparc fitsutil 1349560974 fitsutil-src.tar.gz
+ freebsd fitsutil 1349560974 fitsutil-src.tar.gz
+ sunos fitsutil 1349560974 fitsutil-src.tar.gz
+ linux64 guiapps 1339696827 guiapps-linux64.tar.gz
+ linux guiapps 1339696837 guiapps-linux.tar.gz
+ redhat guiapps 1339696843 guiapps-src.tar.gz
+ macintel guiapps 1339696808 guiapps-macintel.tar.gz
+ macosx guiapps 1339696817 guiapps-macosx.tar.gz
+ ssun guiapps 1339696843 guiapps-src.tar.gz
+ sparc guiapps 1339696843 guiapps-src.tar.gz
+ freebsd guiapps 1339696843 guiapps-src.tar.gz
+ sunos guiapps 1339696843 guiapps-src.tar.gz
+ linux64 mem0 1339696846 mem0-linux64.tar.gz
+ linux mem0 1339696847 mem0-linux.tar.gz
+ redhat mem0 1339696847 mem0-src.tar.gz
+ macintel mem0 1339696844 mem0-macintel.tar.gz
+ macosx mem0 1339696845 mem0-macosx.tar.gz
+ ssun mem0 1339696847 mem0-src.tar.gz
+ sparc mem0 1339696847 mem0-src.tar.gz
+ freebsd mem0 1339696847 mem0-src.tar.gz
+ sunos mem0 1339696847 mem0-src.tar.gz
+ linux64 mscdb 1339696652 mscdb-universal.tar.gz
+ linux mscdb 1339696652 mscdb-universal.tar.gz
+ redhat mscdb 1339696652 mscdb-universal.tar.gz
+ macintel mscdb 1339696652 mscdb-universal.tar.gz
+ macosx mscdb 1339696652 mscdb-universal.tar.gz
+ ssun mscdb 1339696652 mscdb-universal.tar.gz
+ sparc mscdb 1339696652 mscdb-universal.tar.gz
+ freebsd mscdb 1339696652 mscdb-universal.tar.gz
+ sunos mscdb 1339696652 mscdb-universal.tar.gz
+ linux64 mscred 1344481579 mscred-linux64.tar.gz
+ linux mscred 1344481562 mscred-linux.tar.gz
+ redhat mscred 1344481589 mscred-src.tar.gz
+ macintel mscred 1344481524 mscred-macintel.tar.gz
+ macosx mscred 1344481543 mscred-macosx.tar.gz
+ ssun mscred 1344481589 mscred-src.tar.gz
+ sparc mscred 1344481589 mscred-src.tar.gz
+ freebsd mscred 1344481589 mscred-src.tar.gz
+ sunos mscred 1344481589 mscred-src.tar.gz
+ linux64 mtools 1339696859 mtools-linux64.tar.gz
+ linux mtools 1339696862 mtools-linux.tar.gz
+ redhat mtools 1339696863 mtools-src.tar.gz
+ macintel mtools 1339696850 mtools-macintel.tar.gz
+ macosx mtools 1339696855 mtools-macosx.tar.gz
+ ssun mtools 1339696863 mtools-src.tar.gz
+ sparc mtools 1339696863 mtools-src.tar.gz
+ freebsd mtools 1339696863 mtools-src.tar.gz
+ sunos mtools 1339696863 mtools-src.tar.gz
+ linux64 nfextern 1369155500 nfextern-linux64.tar.gz
+ linux nfextern 1369155452 nfextern-linux.tar.gz
+ redhat nfextern 1369155644 nfextern-src.tar.gz
+ macintel nfextern 1369155552 nfextern-macintel.tar.gz
+ macosx nfextern 1369155603 nfextern-macosx.tar.gz
+ ssun nfextern 1332311037 nfextern-ssun.tar.gz
+ sparc nfextern 1369155644 nfextern-src.tar.gz
+ freebsd nfextern 1369155644 nfextern-src.tar.gz
+ sunos nfextern 1369155644 nfextern-src.tar.gz
+ linux64 optic 1332309566 optic-universal.tar.gz
+ linux optic 1332309566 optic-universal.tar.gz
+ redhat optic 1332309566 optic-universal.tar.gz
+ macintel optic 1332309566 optic-universal.tar.gz
+ macosx optic 1332309566 optic-universal.tar.gz
+ ssun optic 1332309566 optic-universal.tar.gz
+ sparc optic 1332309566 optic-universal.tar.gz
+ freebsd optic 1332309566 optic-universal.tar.gz
+ sunos optic 1332309566 optic-universal.tar.gz
+ linux64 patch 1337903759 patch-src.tar.gz
+ linux patch 1337903759 patch-src.tar.gz
+ redhat patch 1337903759 patch-src.tar.gz
+ macintel patch 1337903759 patch-src.tar.gz
+ macosx patch 1337903759 patch-src.tar.gz
+ ssun patch 1337903759 patch-src.tar.gz
+ sparc patch 1337903759 patch-src.tar.gz
+ freebsd patch 1337903759 patch-src.tar.gz
+ sunos patch 1337903759 patch-src.tar.gz
+ linux64 rvsao 1322067222 rvsao-redhat.tar.gz
+ linux rvsao 1322067222 rvsao-redhat.tar.gz
+ redhat rvsao 1322067222 rvsao-redhat.tar.gz
+ macintel rvsao 1322067226 rvsao-macosx.tar.gz
+ macosx rvsao 1322067226 rvsao-macosx.tar.gz
+ ssun rvsao 1322067223 rvsao-ssun.tar.gz
+ sparc rvsao 1322067228 rvsao-src.tar.gz
+ freebsd rvsao 1322067228 rvsao-src.tar.gz
+ sunos rvsao 1322067228 rvsao-src.tar.gz
+ linux64 song 1332309566 song-universal.tar.gz
+ linux song 1332309566 song-universal.tar.gz
+ redhat song 1332309566 song-universal.tar.gz
+ macintel song 1332309566 song-universal.tar.gz
+ macosx song 1332309566 song-universal.tar.gz
+ ssun song 1332309566 song-universal.tar.gz
+ sparc song 1332309566 song-universal.tar.gz
+ freebsd song 1332309566 song-universal.tar.gz
+ sunos song 1332309566 song-universal.tar.gz
+ linux64 sqiid 1332309566 sqiid-universal.tar.gz
+ linux sqiid 1332309566 sqiid-universal.tar.gz
+ redhat sqiid 1332309566 sqiid-universal.tar.gz
+ macintel sqiid 1332309566 sqiid-universal.tar.gz
+ macosx sqiid 1332309566 sqiid-universal.tar.gz
+ ssun sqiid 1332309566 sqiid-universal.tar.gz
+ sparc sqiid 1332309566 sqiid-universal.tar.gz
+ freebsd sqiid 1332309566 sqiid-universal.tar.gz
+ sunos sqiid 1332309566 sqiid-universal.tar.gz
+ linux64 stecf 1344881975 stecf-linux.tar.gz
+ linux stecf 1344881975 stecf-linux.tar.gz
+ redhat stecf 1344881976 stecf-src.tar.gz
+ macintel stecf 1344881973 stecf-macosx.tar.gz
+ macosx stecf 1344881973 stecf-macosx.tar.gz
+ ssun stecf 1344881976 stecf-src.tar.gz
+ sparc stecf 1344881976 stecf-src.tar.gz
+ freebsd stecf 1344881976 stecf-src.tar.gz
+ sunos stecf 1344881976 stecf-src.tar.gz
+ linux64 stsdas 1344881903 stsdas-linux.tar.gz
+ linux stsdas 1344881903 stsdas-linux.tar.gz
+ redhat stsdas 1344881948 stsdas-src.tar.gz
+ macintel stsdas 1344881815 stsdas-macosx.tar.gz
+ macosx stsdas 1344881815 stsdas-macosx.tar.gz
+ ssun stsdas 1344881948 stsdas-src.tar.gz
+ sparc stsdas 1344881948 stsdas-src.tar.gz
+ freebsd stsdas 1344881948 stsdas-src.tar.gz
+ sunos stsdas 1344881948 stsdas-src.tar.gz
+ linux64 tables 1344881966 tables-linux.tar.gz
+ linux tables 1344881966 tables-linux.tar.gz
+ redhat tables 1344881971 tables-src.tar.gz
+ macintel tables 1344881959 tables-macosx.tar.gz
+ macosx tables 1344881959 tables-macosx.tar.gz
+ ssun tables 1344881971 tables-src.tar.gz
+ sparc tables 1344881971 tables-src.tar.gz
+ freebsd tables 1344881971 tables-src.tar.gz
+ sunos tables 1344881971 tables-src.tar.gz
+ linux64 ucsclris 1339696867 ucsclris-linux64.tar.gz
+ linux ucsclris 1339696867 ucsclris-linux.tar.gz
+ redhat ucsclris 1339696868 ucsclris-src.tar.gz
+ macintel ucsclris 1339696864 ucsclris-macintel.tar.gz
+ macosx ucsclris 1339696865 ucsclris-macosx.tar.gz
+ ssun ucsclris 1339696868 ucsclris-src.tar.gz
+ sparc ucsclris 1339696868 ucsclris-src.tar.gz
+ freebsd ucsclris 1339696868 ucsclris-src.tar.gz
+ sunos ucsclris 1339696868 ucsclris-src.tar.gz
+ linux64 upsqiid 1332309566 upsqiid-universal.tar.gz
+ linux upsqiid 1332309566 upsqiid-universal.tar.gz
+ redhat upsqiid 1332309566 upsqiid-universal.tar.gz
+ macintel upsqiid 1332309566 upsqiid-universal.tar.gz
+ macosx upsqiid 1332309566 upsqiid-universal.tar.gz
+ ssun upsqiid 1332309566 upsqiid-universal.tar.gz
+ sparc upsqiid 1332309566 upsqiid-universal.tar.gz
+ freebsd upsqiid 1332309566 upsqiid-universal.tar.gz
+ sunos upsqiid 1332309566 upsqiid-universal.tar.gz
+ linux64 xdimsum 1339696873 xdimsum-linux64.tar.gz
+ linux xdimsum 1339696874 xdimsum-linux.tar.gz
+ redhat xdimsum 1339696874 xdimsum-src.tar.gz
+ macintel xdimsum 1339696869 xdimsum-macintel.tar.gz
+ macosx xdimsum 1339696871 xdimsum-macosx.tar.gz
+ ssun xdimsum 1339696874 xdimsum-src.tar.gz
+ sparc xdimsum 1339696874 xdimsum-src.tar.gz
+ freebsd xdimsum 1339696874 xdimsum-src.tar.gz
+ sunos xdimsum 1339696874 xdimsum-src.tar.gz
diff --git a/util/.repo_pkgs b/util/.repo_pkgs
new file mode 100644
index 00000000..62c173d7
--- /dev/null
+++ b/util/.repo_pkgs
@@ -0,0 +1,23 @@
+adccdrom
+cfh12k
+ctio
+deitab
+esowfi
+fitsutil
+guiapps
+mem0
+mscdb
+mscred
+mtools
+nfextern
+optic
+patch
+rvsao
+song
+sqiid
+stecf
+stsdas
+tables
+ucsclris
+upsqiid
+xdimsum
diff --git a/util/.version b/util/.version
new file mode 100644
index 00000000..71143aeb
--- /dev/null
+++ b/util/.version
@@ -0,0 +1 @@
+v2.16
diff --git a/util/.zzsetenv.def b/util/.zzsetenv.def
new file mode 100644
index 00000000..2fa992c0
--- /dev/null
+++ b/util/.zzsetenv.def
@@ -0,0 +1 @@
+keep
diff --git a/util/README b/util/README
new file mode 100644
index 00000000..2a17ea68
--- /dev/null
+++ b/util/README
@@ -0,0 +1,19 @@
+
+ This directory contains utility scripts used to build and
+maintain the system from the top-level IRAF root directory. These
+scripts should NOT be used to build individual packages or source
+directories.
+
+Contents include:
+
+ README This file
+ chk64 Check subdirectories for 64-bit issues
+ mkarch Reconfigure the system for given architecture
+ mkclean Clean the current architecture of binaries
+ mkdist Create a distribution file (NYI)
+ mkproto Create system prototype files
+ mksrc Clean the system of all binaries
+ mksysgen Build from a clean system source
+ mkup Update current-arch binaries
+ mkupx Update current-arch binaries (debug)
+
diff --git a/util/check_update b/util/check_update
new file mode 100755
index 00000000..b1973b8c
--- /dev/null
+++ b/util/check_update
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+# CHECK_UPDATE -- Check to see if an update is available. Return $status=1
+# if a patch is available.
+#
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+# Called from Makefile, set iraf root.
+source $iraf/unix/hlib/irafuser.sh
+
+
+REPO=`${iraf}/util/pkgrepo`
+if [ -n $IRAFARCH ]; then
+ arch=$IRAFARCH
+else
+ arch=`${iraf}/unix/hlib/irafarch.sh -actual`
+fi
+
+
+# Check to see if a patch file is available.
+
+/bin/rm -f /tmp/_rdate /tmp/_pdate
+
+FGET="${iraf}/util/fget"
+${FGET} -q -o /tmp/_rdate http://iraf.noao.edu/ftp/v216/PCIX/.release_date
+${FGET} -q -o /tmp/_pdate http://iraf.noao.edu/ftp/v216/PCIX/.patch_release
+
+if [ -e /tmp/_rdate ]; then
+ rdate=`cat /tmp/_rdate`
+else
+ /bin/echo "cannot get rdate"
+ exit 0
+fi
+if [ -e /tmp/_pdate ]; then
+ pdate=`cat /tmp/_pdate`
+else
+ echo "cannot get pdate"
+ exit 0
+fi
+
+
+if [ -e ${iraf}/.patch_release ]; then
+ ipdate=`/bin/ls -l --time-style=+%s ${iraf}/.patch_release | awk '{ print ($6) }'`
+else
+ ipdate=0
+fi
+
+if [ "$1" == "-d" ]; then # Debug
+ /bin/echo " rdate = " $rdate
+ /bin/echo " pdate = " $pdate
+ /bin/echo "ipdate = " $ipdate
+fi
+
+if (( $rdate>$pdate )); then # New Release
+ exit 1
+fi
+
+
+if (( $pdate==0 )); then
+ exit 0
+elif (( $pdate>$ipdate && $ipdate!=0 )); then # Patch newer than installed
+ exit 1
+fi
+
+
+exit 0 # No update available
diff --git a/util/chk64 b/util/chk64
new file mode 100755
index 00000000..b042cc88
--- /dev/null
+++ b/util/chk64
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+find . -type f -name \*.x -exec egrep -H SZ_REAL {} \; >& _real
+find . -type f -name \*.h -exec egrep -H SZ_REAL {} \; >& _realh
+
+find . -type f -name \*.h -exec egrep -H SZ_INT {} \; >& _inth
+find . -type f -name \*.x -exec egrep -H SZ_INT {} \; >& _int
+
+find . -type f -name \*.x -exec egrep -H SZ_STRUCT {} \; >& _sz
+find . -type f -name \*.h -exec egrep -H SZ_STRUCT {} \; >& _szh
+
+find . -type f -name \*.x -exec egrep -H mii_ {} \; >& _mii
+find . -type f -name \*.gx -exec egrep -H SZ_PIXEL {} \; >& _szpix
+
+find . -type f -name \*.x -exec egrep -H sizeof {} \; | \
+ egrep -v -e ":int" >& _sizeof
+find . -type f -name \*.x -exec egrep -H szdtype {} \; >& _szdtype
diff --git a/util/fget b/util/fget
new file mode 100755
index 00000000..828f2463
--- /dev/null
+++ b/util/fget
@@ -0,0 +1,184 @@
+#!/bin/bash
+#
+# FGET -- Download a URL.
+#
+# Usage: fget [-h] [-n] [-q | -v] url
+#
+# Where -n no-op flag
+# -q suppress output
+# -v verbose output
+# -d set download directory
+# -o set output filename
+# -h this message
+#
+# Example:
+# % fget -q ftp://iraf.noao.edu/iraf/extern/foo-linux.tar.gz
+#
+# ----------------------------------------------------------------------------
+
+
+export PATH=../util:/sbin:/usr/sbin:/bin:/usr/bin:$PATH:/usr/local/bin:/opt/local/bin:/local/bin
+
+
+##############################################################################
+# START OF MACHDEP DEFINITIONS.
+##############################################################################
+
+# MACHDEP definitions which may be reset below.
+
+
+# Find the iraf root directory.
+if [ -n "$iraf" ]; then
+ iraf=""
+ files=("~/.iraf.h" "~/.iraf/iraf.h" "/usr/include/iraf.h")
+ for f in ${files[@]}; do
+ # $iraf is defined, use a well-known path for the system
+ if [ -e $f ]; then
+ i=`egrep IRAF $f | egrep \#define | sed -e 's/"//g' | awk '{print $3}'`
+ iraf=${i}
+ break
+ fi
+ done
+fi
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source ../unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+# Determine platform architecture.
+arch=`$iraf/unix/hlib/irafarch.sh`
+
+
+##############################################################################
+# END OF MACHDEP DEFINITIONS.
+##############################################################################
+
+#=============================================================================
+# Declarations and initializations.
+#=============================================================================
+
+exec=yes
+verb=no
+url=""
+fname=""
+ddir=""
+
+
+# Process cmdline flags.
+while [ -n "$1" ] ; do
+ case "$1" in
+ "-n") # no execute
+ exec=no
+ ;;
+ "-q") # be quiet
+ verb=no
+ quiet=yes
+ ;;
+ "-v") # be chatty
+ verb=yes
+ quiet=no
+ ;;
+ "-h") # print help summary
+ _Usage
+ ;;
+ "-d") # set download directory
+ ddir=$2
+ shift
+ ;;
+ "-o") # set output file name
+ fname=$2
+ shift
+ ;;
+ *)
+ url=$1
+ ;;
+ esac
+
+ if [ "$2" == "" ]; then
+ break
+ else
+ shift
+ fi
+done
+
+
+# Error checks.
+if [ -z "$url" ]; then
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "ERROR: URL not specified"
+ fi
+ exit 1
+fi
+
+# Get the download filename. Delete an existing copy of the file
+if [ -z $fname ]; then
+ fname=${url##*/}
+fi
+if [ -e "$fname" ]; then
+ /bin/rm -f $fname
+fi
+
+# Ensure URL is an HTTP protocol.
+prot=`echo $url | cut -c1-3`
+if [ "$prot" == "ftp" ]; then
+ u=`echo $url | sed -e 's;ftp://iraf.noao.edu/iraf;http://iraf.noao.edu/ftp;'`
+ url=$u
+fi
+
+# Do it.
+if [ "$exec" == "yes" ]; then
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "Downloading "$url" ...."
+ fi
+
+ args="url='$url' fname='${ddir}${fname}' cache='/tmp' verbose=no extn='' use_cache=no"
+ if [ "$verb" == "no" ]; then
+ $iraf/bin.$arch/x_system.e urlget ${args} \$nargs=2 >> /dev/null 2>&1
+ else
+ $iraf/bin.$arch/x_system.e urlget ${args} \$nargs=2
+ fi
+
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "done"
+ fi
+fi
+
+
+# Verify we have the file.
+if [ ! -e ${url##*/} ]; then
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "Error downloading file '"$fname"'"
+ fi
+ exit 1
+else
+ if (( $#>1 )); then
+ mv ${url##*/} $2
+ fi
+fi
+
+# Normal exit.
+exit 0
+
+
+
+#=============================================================================
+# Usage
+#=============================================================================
+
+_Usage() {
+ /bin/echo "Usage: fget [-h] [-n] [-q | -v] url"
+ /bin/echo ""
+ /bin/echo " where -n # no execute"
+ /bin/echo " -q # suppress output"
+ /bin/echo " -v # verbose output"
+ /bin/echo " -h # this message"
+
+ exit 0
+}
diff --git a/util/iraf_latest b/util/iraf_latest
new file mode 100755
index 00000000..32462113
--- /dev/null
+++ b/util/iraf_latest
@@ -0,0 +1,114 @@
+#!/bin/bash
+#
+# IRAF_LATEST - Update the system with the latest distribution files.
+
+
+opt="all"
+
+
+if (( $#<1 )); then
+ /bin/echo "Usage: iraf_latest <opt>"
+ exit 0
+else
+ opt=$1
+fi
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+# Called from Makefile, set iraf root.
+if [ -e $iraf/unix/hlib/irafuser.sh ]; then
+ source $iraf/unix/hlib/irafuser.sh
+fi
+
+echo '$iraf is '$iraf
+
+
+REPO=`${iraf}/util/pkgrepo`
+if [ -n "$IRAFARCH" ]; then
+ arch=$IRAFARCH
+else
+ arch=`${iraf}/unix/hlib/irafarch.sh -actual`
+fi
+
+
+#/bin/echo "iraf_latest: cwd = " `pwd`
+
+# Figure out which binaries are required.
+files="patch-src.tar.gz" # always need the source ....
+bins=""
+archs=("linux" "linux64" "macosx" "macintel")
+for b in ${archs[@]} ; do
+ if [ -e "bin.$b/x_images.e" ]; then
+ bins=`/bin/echo $bins " " $b`
+ case "$b" in
+ "linux")
+ files=`/bin/echo "$files patch.lnux.x86.tar.gz"`
+ ;;
+ "linux64")
+ files=`/bin/echo "$files patch.lnux.x86_64.tar.gz"`
+ ;;
+ "macosx")
+ files=`/bin/echo "$files patch.macx.x86.tar.gz"`
+ ;;
+ "macintel")
+ files=`/bin/echo "$files patch.macx.x86_64.tar.gz"`
+ ;;
+ esac
+ fi
+done
+/bin/echo "Updating binaries: " $bins
+
+
+# Download the needed files to /tmp
+
+FGET="${iraf}/util/fget"
+REPO=`${iraf}/util/pkgrepo`
+for f in ${files[@]} ; do
+ /bin/echo -n "Downloading: $f"
+ ${FGET} -q -d /tmp/ $REPO/$f
+
+ if [ ! -e /tmp/$f ]; then
+ /bin/echo ""
+ /bin/echo "Error: file $REPO/$f not found, quitting"
+ exit 1
+ elif [ -z /tmp/$f ]; then
+ /bin/echo ""
+ /bin/echo "Error downloading $REPO/$f, quitting"
+ exit 1
+ fi
+
+ /bin/echo ""
+ /bin/echo -n "Unpacking ..."
+ tar zxf /tmp/$f
+ /bin/rm -f /tmp/$f
+
+ /bin/echo " Done."
+done
+
+
+# For the initial release, the update procedures haven't yet been defined.
+# This script will be replaced by the working version at the first release.
+
+
+if [ $opt == "all" ]; then # Update everything
+ if [ -e extern/.installed ]; then
+ /bin/echo "Update all external packages ..."
+ (cd extern ; make update)
+ fi
+else
+ /bin/echo "Unknown option '"$opt"'"
+ exit 1
+fi
+
+/bin/echo ""
+exit 0
diff --git a/util/iraf_update b/util/iraf_update
new file mode 100755
index 00000000..fb0f1a3f
--- /dev/null
+++ b/util/iraf_update
@@ -0,0 +1,109 @@
+#!/bin/bash
+#
+# IRAF_UPDATE - Update the core IRAF system with a cumulative patch.
+
+opt="all"
+all=yes
+src_only=no
+list_only=no
+core_only=no
+noao_only=no
+vo_only=no
+
+if (( $#<1 )); then
+ opt="all"
+ all=yes
+else
+
+ # Process cmdline flags.
+ while [ -n "$1" ]; do
+ case "$1" in
+ "-all") # clean all package .s
+ all=yes
+ opt="all"
+ ;;
+ "-src") # update only . code
+ src_only=yes
+ opt="src"
+ ;;
+ "-list") # list files needing updating
+ list_only=yes
+ opt="list"
+
+ /bin/echo ""
+ util/check_update
+ if (( $?==0 )); then
+ /bin/echo "IRAF is up to date"
+ else
+ /bin/echo "An IRAF update is available"
+ fi
+ /bin/echo ""
+ (cd util; ${iraf}/util/pkgupdate -list)
+ exit 0
+ ;;
+ "-core") # update only core system
+ core_only=yes
+ opt="core"
+ ;;
+ "-noao") # update only NOAO package
+ noao_only=yes
+ opt="noao"
+ ;;
+ "-vo") # update only VO package
+ vo_only=yes
+ opt="vo"
+ ;;
+ *)
+ /bin/echo "Error: Unknown option '"$1"', quitting."
+ exit 1
+ esac
+
+ shift
+ done
+fi
+
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+# Called from Makefile, iraf=true root.
+source $iraf/unix/hlib/irafuser.sh
+irafdir=$iraf
+
+
+REPO=`${irafdir}/util/pkgrepo`
+if [ -n "$IRAFARCH" ]; then
+ arch=$IRAFARCH
+else
+ arch=`${irafdir}/unix/hlib/irafarch.sh -actual`
+fi
+
+
+# Init the build scripts as the first update.
+#/bin/echo "Updating build scripts ...."
+#${iraf}/util/self_update
+
+
+# Execute the update.
+/bin/echo "Updating IRAF system ...."
+util/iraf_latest $opt
+
+if (( $? == 2 )); then
+ /bin/echo -n "Update Status: No updates necessary"
+else if (( $? == 0 )); then
+ /bin/echo -n "Update Status: Successful "
+else
+ /bin/echo -n "Update Status: Fails "
+fi
+/bin/echo ""
+
+exit 0
diff --git a/util/mkarch b/util/mkarch
new file mode 100755
index 00000000..733dc04f
--- /dev/null
+++ b/util/mkarch
@@ -0,0 +1,78 @@
+#!/bin/bash
+#
+# MKARCH - Return platform architecture. Assumes source-only tree and
+# that it's safe to just manually change links.
+
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+aarch=`unix/hlib/irafarch.sh -actual`
+
+if [ -e "$iraf/unix/bin.$aarch/mkpkg.e" ]; then
+ # Assume we've got a system with binaries and can use MKPKG.
+ use_mkpkg=1
+else
+ if [ -n "$IRAFARCH" -a -e "$iraf/unix/bin.$IRAFARCH/mkpkg.e" ]; then
+ use_mkpkg=1
+ else
+ # Change the links manually, but strip all binaries first.
+ use_mkpkg=0
+ fi
+fi
+
+
+# Parse the arguments.
+loop_="yes"
+while [ "$loop_" == "yes" ]; do
+ /bin/echo "Making architecture: "$arch
+
+ if [ "$#" -gt 0 ]; then
+ arch=$1
+
+ if (( "$use_mkpkg"==1 )); then
+ mkpkg $arch
+ cd noao; mkpkg -p noao $arch; cd ../
+ cd vo; mkpkg -p vo $arch; cd ../
+ else
+ $iraf/util/mkclean
+ /bin/rm -rf bin noao/bin unix/bin unix/as vo/bin
+
+ ln -s bin.$arch bin
+ cd vo; ln -s bin.$arch bin; cd ../
+ cd noao; ln -s bin.$arch bin; cd ../
+ cd unix; ln -s bin.$arch bin; cd ../
+ cd unix; ln -s as.$arch as; cd ../
+ fi
+
+ if [ "$arch" == "macintel" -o "$arch" == "linux64" ]; then
+ cd unix/hlib; \
+ rm -f iraf.h mach.h; \
+ ln -s iraf64.h iraf.h; \
+ ln -s mach64.h mach.h; cd $iraf
+ else
+ cd unix/hlib; \
+ rm -f iraf.h mach.h; \
+ ln -s iraf32.h iraf.h; \
+ ln -s mach32.h mach.h; cd $iraf
+ fi
+ loop_="no"
+
+ else
+ arch=$aarch
+ loop_="yes"
+ fi
+done
+
+if [ -e "$HOME/.iraf/arch" ]; then
+ echo $arch > $HOME/.iraf/arch
+fi
diff --git a/util/mkbindist b/util/mkbindist
new file mode 100755
index 00000000..0e1b978f
--- /dev/null
+++ b/util/mkbindist
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/5bin:/usr/ucb:/etc:/usr/etc:$PATH:/usr/local/bin:/opt/local/bin:/local/bin:/home/local/bin
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+# Utility aliases.
+source $iraf/unix/hlib/util.sh
+
+if [ ! -n "$iraf" ]; then
+ /bin/echo ""
+ /bin/echo "Error: You must have the iraf env variable defined !"
+ /bin/echo ""
+ exit 1
+fi
+
+exec=yes
+arch=`$iraf/unix/hlib/irafarch.sh -actual`
+
+
+#=============================================================================
+# Process any command line arguments.
+#=============================================================================
+while [ -n "$1" ]; do
+ case "$1" in
+ "-n") # no execute
+ exec=no
+ ;;
+ *)
+ ERRMSG "$0: unknown argument $1"
+ ;;
+ esac
+
+ if [ -n "$2" ]; then
+ shift
+ else
+ break
+ fi
+done
+
+
+
+#----------------------------------
+# Determine platform architecture.
+#----------------------------------
+
+mach=`$iraf/unix/hlib/irafarch.sh -actual`
+hmach=`$iraf/unix/hlib/irafarch.sh -actual`
+
+/bin/echo "mach = " $mach
+/bin/echo "hmach = " $hmach
+
+make generic
+
+/bin/echo -n "Making $arch binary distribution ...."
+ make generic
+ if [ $exec == "yes" ]; then
+ tar czf ../${arch}-bin.tar.gz bin.$arch */bin.$arch extern/*/bin.$arch
+ else
+ /bin/echo "tar czf ../${arch}-bin.tar.gz bin.$arch */bin.$arch extern/*/bin.$arch"
+ fi
+/bin/echo " Done"
+
+exit 0
diff --git a/util/mkclean b/util/mkclean
new file mode 100755
index 00000000..57aab395
--- /dev/null
+++ b/util/mkclean
@@ -0,0 +1,111 @@
+#!/bin/bash
+#
+# MKSRC -- Make a pure source tree and configure the links for the
+# current architecture.
+
+
+export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/5bin:/usr/ucb:/etc:/usr/etc:$PATH:/usr/local/bin:/opt/local/bin:/local/bin:/home/local/bin
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+# Utility aliases.
+source $iraf/unix/hlib/util.sh
+
+if [ ! -n "$iraf" ]; then
+ /bin/echo ""
+ /bin/echo "Error: You must have the iraf env variable defined !"
+ /bin/echo ""
+ exit 1
+fi
+
+exec=yes
+arch=`$iraf/unix/hlib/irafarch.sh`
+
+
+#=============================================================================
+# Process any command line arguments.
+#=============================================================================
+while [ -n "$1" ]; do
+ case "$1" in
+ "-n") # no execute
+ exec=no
+ ;;
+ *)
+ ERRMSG "$0: unknown argument $1"
+ ;;
+ esac
+
+ if [ -n "$2" ]; then
+ shift
+ else
+ break
+ fi
+done
+
+
+#----------------------------------
+# Determine platform architecture.
+#----------------------------------
+
+mach=`$iraf/unix/hlib/irafarch.sh -actual`
+hmach=`$iraf/unix/hlib/irafarch.sh -actual`
+
+/bin/echo "mach = " $mach
+/bin/echo "hmach = " $hmach
+
+/bin/echo -n "Clean host directories ...."
+if [ $exec == "yes" ]; then
+ /bin/rm -f unix/bin.$arch/[agm-z]*.e unix/bin.$arch/lib[bco]*.a >> /dev/null 2>&1
+else
+ /bin/ls -l unix/bin.$arch/[agm-z]*.e unix/bin.$arch/lib[bco]*.a
+fi
+/bin/echo " Done"
+
+
+/bin/echo -n "Clean src directories ...."
+pats=("local" "math" "pkg" "sys" "noao/[adfimnorst]*")
+for i in ${pats[@]} ; do
+ if [ $exec == "yes" ]; then
+ find $i -type f -name \*.a -exec /bin/rm -f {} \; >> /dev/null 2>&1
+ find $i -type f -name \*.e -exec /bin/rm -f {} \; >> /dev/null 2>&1
+ find $i -type f -name \*.o -exec /bin/rm -f {} \; >> /dev/null 2>&1
+ else
+ find $i -type f -name \*.a -exec /bin/ls -l {} \;
+ find $i -type f -name \*.e -exec /bin/ls -l {} \;
+ find $i -type f -name \*.o -exec /bin/ls -l {} \;
+ fi
+done
+/bin/echo " Done"
+
+
+/bin/echo -n "Clean '$arch' bin directories ...."
+if [ $exec == "yes" ]; then
+ /bin/rm -rf bin.$arch/lib[a-z]*.a >> /dev/null 2>&1
+ /bin/rm -rf bin.$arch/*.[eoZ] >> /dev/null 2>&1
+ /bin/rm -rf noao/bin.$arch/*.[aeoZ] >> /dev/null 2>&1
+else
+ /bin/ls -l bin.$arch/lib[a-z]*.a >> /dev/null 2>&1
+ /bin/ls -l bin.$arch/*.[aeoZ] >> /dev/null 2>&1
+ /bin/ls -l noao/bin.$arch/*.[aeoZ] >> /dev/null 2>&1
+fi
+/bin/echo " Done"
+
+
+/bin/echo -n "Cleaning spool files ...."
+if [ $exec == "yes" ]; then
+ find . -name spool\* -print -exec /bin/rm -f {} \; >> /dev/null 2>&1
+else
+ find . -name spool\* -print
+fi
+/bin/echo " Done"
+
+exit 0
diff --git a/util/mkdist b/util/mkdist
new file mode 100755
index 00000000..92d41daf
--- /dev/null
+++ b/util/mkdist
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+bins=("cygwin" "freebsd" "linux" "linux64" "macintel" "macosx" "sunos")
+for i in ${bins[@]}; do
+ touch bin.$i/IRAF.NET
+ touch noao/bin.$i/IRAF.NET
+done
+
+touch bin.cygwin/IB.CYGW.x86
+touch bin.freebsd/IB.FBSD.x86
+touch bin.linux/IB.LNUX.x86
+touch bin.linux64/IB.LNUX.x86_64
+touch bin.macintel/IB.MACX.x86_64
+touch bin.macosx/IB.MACX.UNI
+touch bin.sunos/IB.SSUN.x86
+touch bin.ipad/IB.IPAD.ARM
+
+touch noao/bin.cygwin/NB.CYGW.x86
+touch noao/bin.freebsd/NB.FBSD.x86
+touch noao/bin.linux/NB.LNUX.x86
+touch noao/bin.linux64/NB.LNUX.x86_64
+touch noao/bin.macintel/NB.MACX.x86_64
+touch noao/bin.macosx/NB.MACX.UNI
+touch noao/bin.sunos/NB.SSUN.x86
+touch noao/bin.ipad/NB.IPAD.ARM
+
diff --git a/util/mkproto b/util/mkproto
new file mode 100755
index 00000000..195bbba6
--- /dev/null
+++ b/util/mkproto
@@ -0,0 +1,123 @@
+#!/bin/bash
+#
+# MKPROTO -- Generate the VOS prototype definitions.
+
+
+vos_dir="sys"
+math_dir=""
+xtools_dir="pkg/xtools"
+ds_dir="pkg/images/tv/display pkg/images/tv/wcslab"
+
+#vosdirs="$vos_dir $math_dir $ds_dir"
+vosdirs="$vos_dir $math_dir $xtools_dir $ds_dir"
+
+curdir=`pwd`
+tproto=/tmp/_vosproto.$$
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+for d in ${vosdirs[@]}; do
+
+ # Process each of the subdirectories.
+ #
+ sdirs=`find $d -type d -print`
+ for sd in ${sdirs[@]}; do
+
+ # Skip the IMFORT library and any documentation directories
+ fname=${sd##*/}
+ if [ $fname != "doc" -a -n "`/bin/echo $sd | egrep -e imfort`" -a \
+ -n "`/bin/echo $sd | egrep -e osb`" -a \
+ -n "`/bin/echo $sd | egrep -e memdbg`" -a \
+ -n "`/bin/echo $sd | egrep -e nspp`" ]; then
+
+ cd $sd # go to subdirectory
+
+ nf=`ls -1 | egrep -e "\.f" | wc -l` # nfiles to process
+ nx=`ls -1 | egrep -e "\.x" | wc -l` # nfiles to process
+
+ /bin/echo "Processing: "$nx" "$nf" "$sd
+ if (( $nf>0 -o $nx>0 )); then
+
+ # Skip any files beginning with the letters 'zz', e.g. test
+ # files like zzdebug.x
+
+ fils=( `/bin/ls -1 [a-z][a-y]*.[xf]` )
+ for f in ${fils[@]}; do
+ if [ $f != "intrp.f" -a \
+ $f != "xtpmmap.x" -a \
+ $f != "ytpmmap.x" ]; then
+ xc -c -/P $f >> /dev/null 2>&1 # make prototype
+ else
+ /bin/echo " Skipping " $f
+ fi
+ done
+
+ egrep -h ^extern *.P >> $tproto # save prototypes
+ /bin/rm -f *.[oP] >> /dev/null 2>&1 # clean up
+ fi
+ cd $curdir # back to top
+ else
+ /bin/echo " Skipping " $sd
+ fi
+ done
+done
+
+# Sort the prototype file, exclude certain symbols which are duplicates
+# in the VOS but harmless because they occur in places that never conflict,
+# e.g. the stdgraph and imd kernels.
+
+cat $tproto | \
+ egrep -v arbpix_ | \
+ egrep -v imdgeg_ | \
+ egrep -v stxset_ | \
+ egrep -v stxpas_ | \
+ egrep -v dgt_ | \
+ egrep -v sgt_ | \
+ egrep -v asider_ | \
+ egrep -v asifit_ | \
+ egrep -v bndsol_ | \
+ egrep -v ffa_ | \
+ egrep -v ffs_ | \
+ egrep -v fft842_ | \
+ egrep -v avdrs_ | \
+ egrep -v asigrl_ | \
+ egrep -v smooth_ | \
+ egrep -v sigl2 | \
+ egrep -v sigm2 | \
+ egrep -v impcom_ | \
+ egrep -v intrp | \
+ egrep -v srch | \
+ egrep -v codim | \
+ egrep -v mrsole | \
+ egrep -v mreval | \
+ egrep -v \ icg | \
+ egrep -v iclisd | \
+ egrep -v gscr | \
+ egrep -v imdcom | \
+ egrep -v getrot | \
+ egrep -v gtplot | \
+ egrep -v xev | \
+ egrep -v ceps | \
+ egrep -v sgt | \
+ egrep -v sgt | \
+ egrep -v U_fp | \
+ sort >$iraf/unix/hlib/libc/vosproto.h
+
+# sigl2* and sigm2* removed because of multiple uses in apps
+# impcom removed because imio$dbc/impcom.x conflicts with plot$t_implot.x
+# use of 'impcom' as a common
+# intrp* removed because it's use is xtools$ was commented out
+# srch* removed because it's use is xtools$ was commented out
+# mrsole/mreval removed because of duplicate use (splot$deblend.x and
+# xtools$numrecipes)
+# icguag removed duplicate use in noao$imred/dtoi
diff --git a/util/mksrc b/util/mksrc
new file mode 100755
index 00000000..ba22dca4
--- /dev/null
+++ b/util/mksrc
@@ -0,0 +1,105 @@
+#!/bin/bash
+#
+# MKSRC -- Make a pure source tree and configure the links for the
+# current architecture.
+
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+# Utility aliases.
+source $iraf/unix/hlib/util.sh
+
+if [ -z "$iraf" ]; then
+ /bin/echo ""
+ /bin/echo "Error: You must have the iraf env variable defined !"
+ /bin/echo ""
+ exit 1
+fi
+
+
+exec=yes
+arch=`$iraf/unix/hlib/irafarch.sh`
+
+
+#=============================================================================
+# Process any command line arguments.
+#=============================================================================
+while [ -n "$1" ] ; do
+ case "$1" in
+ "-n") # no execute
+ exec=no
+ ;;
+ *)
+ ERRMSG "$0: unknown argument $1"
+ ;;
+ esac
+
+ if [ -n "$2" ]; then
+ shift
+ else
+ break
+ fi
+done
+
+
+
+#----------------------------------
+# Determine platform architecture.
+#----------------------------------
+
+/bin/echo -n "Clean host directories ...."
+ if [ $exec == "yes" ]; then
+ /bin/rm -f unix/bin.*/[agm-z]*.e unix/bin.*/lib[bco]*.a >> /dev/null 2>&1
+ else
+ /bin/ls -l unix/bin.*/[agm-z]*.e unix/bin.*/lib[bco]*.a
+ fi
+/bin/echo " Done"
+
+
+
+/bin/echo -n "Clean src directories ...."
+dirs=("local" "math" "pkg" "sys" "noao")
+for i in ${dirs[@]}; do
+ if [ $exec == "yes" ]; then
+ find $i -type f -name \*.a -exec /bin/rm -f {} \; >> /dev/null 2>&1
+ find $i -type f -name \*.e -exec /bin/rm -f {} \; >> /dev/null 2>&1
+ find $i -type f -name \*.o -exec /bin/rm -f {} \; >> /dev/null 2>&1
+ find $i -type f -name OBJS\* -exec /bin/ls -l {} \; >> /dev/null 2>&1
+ else
+ find $i -type f -name \*.a -exec /bin/ls -l {} \;
+ find $i -type f -name \*.e -exec /bin/ls -l {} \;
+ find $i -type f -name \*.o -exec /bin/ls -l {} \;
+ find $i -type f -name OBJS\* -exec /bin/ls -l {} \;
+ fi
+done
+/bin/echo " Done"
+
+
+/bin/echo -n "Clean bin directories ...."
+if [ $exec == "yes" ]; then
+ /bin/rm -rf bin.*/*.[aeoZ] noao/bin.*/*.[aeoZ] OBJS* >>/dev/null 2>&1
+else
+ /bin/ls -l bin.*/*.[aeoZ] noao/bin.*/*.[aeoZ] OBJS*
+fi
+/bin/echo " Done"
+
+
+/bin/echo -n "Cleaning spool files ...."
+if [ $exec == "yes" ]; then
+ find . -name spool\* -print -exec /bin/rm -f {} \; >> /dev/null 2>&1
+ find . -name _spool\* -print -exec /bin/rm -f {} \; >> /dev/null 2>&1
+else
+ find . -name spool\* -print
+ find . -name _spool\* -print
+fi
+/bin/echo " Done"
diff --git a/util/mksysgen b/util/mksysgen
new file mode 100755
index 00000000..48c4b338
--- /dev/null
+++ b/util/mksysgen
@@ -0,0 +1,79 @@
+#!/bin/bash
+#
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+if [ -z "$iraf" ]; then
+ #/bin/echo ""
+ #/bin/echo "Error: You must have the iraf env variable defined !"
+ #/bin/echo ""
+ #exit 1
+
+ iraf=`pwd`/
+fi
+
+if [ -e "$HOME/.iraf/arch" ]; then
+ if [ -n "$IRAFARCH" ]; then
+ iarch=`cat $HOME/.iraf/arch`
+ if [ "$iarch" != "$IRAFARCH" ]; then
+ /bin/echo ""
+ /bin/echo 'Error: Your $IRAFARCH does not match $HOME/.iraf/arch,'
+ /bin/echo ' Please change $IRAFARCH or rerun install script.'
+ /bin/echo ""
+ exit 1
+ fi
+ fi
+fi
+
+c_start=`date`
+/bin/rm -f spool */spool
+
+
+$iraf/util/mkclean # clean old binaries
+
+cd $iraf/unix # NOVOS bootstrap
+source hlib/irafuser.sh
+sh -x mkpkg.sh 2>&1 | tee -a spool
+
+cd $iraf/ # build NOVOS
+mkpkg 2>&1 | tee -a spool
+
+cd $iraf/unix # VOS bootstrap
+source hlib/irafuser.sh
+sh -x mkpkg.sh 2>&1 | tee -a spool
+
+cd $iraf/vendor # build vendor libs
+make all 2>&1 | tee -a ../spool.final
+cd ../
+
+cd $iraf/ # build core system
+mkpkg 2>&1 | tee -a spool
+
+cd $iraf/noao # build NOAO package
+export noao=`pwd`/
+mkpkg -p noao 2>&1 | tee -a ../spool.final
+
+cd $iraf/vo # build NOAO package
+export vo=`pwd`/
+mkpkg -p vo 2>&1 | tee -a ../spool.final
+
+/bin/rm -rf bin*/pkgconfig # misc clean up
+
+c_end=`date`
+
+
+/bin/echo ""
+/bin/echo ""
+/bin/echo ""
+/bin/echo "Start: $c_start"
+/bin/echo " End: $c_end"
diff --git a/util/mkup b/util/mkup
new file mode 100755
index 00000000..ed4499f5
--- /dev/null
+++ b/util/mkup
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+source $iraf/unix/hlib/irafuser.sh
+
+# Reconfigure the system for the proper architecture if needed.
+if [ -n "$IRAFARCH" ]; then # use environment value
+ make $IRAFARCH
+else # use actual value
+ arch=`$iraf/unix/hlib/irafarch.sh -actual`
+ cfgarch=`mkpkg arch | sed -e "s/system is configured for //g"`
+ if [ $cfgarch != $arch ]; then
+ #make $arch
+ /bin/echo "Warning: current arch="$cfgarch" but system arch="$arch
+ export IRAFARCH=$arch
+ fi
+fi
+
+cd $iraf/ # build core system
+mkpkg
+mkpkg update
+
+cd $iraf/noao # build NOAO package
+export noao=`pwd`/
+mkpkg -p noao
+
+cd $iraf/vo # build VO package
+export vo=`pwd`/
+cd votools # build VOTOOLS package
+mkpkg -p vo update
diff --git a/util/mkupx b/util/mkupx
new file mode 100755
index 00000000..126c3e8d
--- /dev/null
+++ b/util/mkupx
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+cd $iraf/ # build core system
+mkpkg -x
+
+cd $iraf/noao # build NOAO package
+export noao=$`pwd`/
+mkpkg -x -p noao
+
+cd $iraf/vo # build VO package
+export vo=`pwd`/
+mkpkg -x -p vo
diff --git a/util/pkgall b/util/pkgall
new file mode 100755
index 00000000..d95eb485
--- /dev/null
+++ b/util/pkgall
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# PKGALL -- Install all available packages.
+
+
+if [ -e ".repo_pkgs" ]; then
+ p=`cat .repo_pkgs`
+ for f in ${p[@]} ; do
+ make $f
+ done
+fi
+
+exit 0
diff --git a/util/pkgclean b/util/pkgclean
new file mode 100755
index 00000000..639f0004
--- /dev/null
+++ b/util/pkgclean
@@ -0,0 +1,88 @@
+#!/bin/bash
+#
+# PKGCLEAN -- Clean the named package, or all packages from the system.
+#
+# Usage: pkgclean [-all] [-dist] [-init] <pkg>
+#
+# Where -all clean all packages
+# <pkg> package to be removed
+#
+# ----------------------------------------------------------------------------
+
+
+all=no
+init=no
+
+# Process cmdline flags.
+while [ -n "$1" ]; do
+ case "$1" in
+ "-all") # clean all package .s
+ all=yes
+ ;;
+ "-init") # init all packages
+ init=yes
+ ;;
+ *)
+ pkg=$1
+ break
+ ;;
+ esac
+ shift
+done
+
+
+if [ "$all" == "yes" ]; then
+ if [ -e ".repo_pkgs" ]; then
+ files=`cat .repo_pkgs`
+ for p in ${files[@]}; do
+ if [ -e $p ]; then
+ /bin/rm -rf $p
+ mkdir $p
+
+ /bin/echo "" > .installed
+ /bin/echo "" > .zzexport .def=
+ fi
+ done
+ fi
+
+elif [ "$init" == "yes" ]; then
+ if [ -e ".repo_pkgs" ]; then
+ files=`cat .repo_pkgs`
+ for p in ${files[@]}; do
+ if [ -e $p ]; then
+ /bin/rm -rf $p
+ fi
+ done
+ fi
+ /bin/rm -rf Makefile >> /dev/null 2>&1
+ /bin/rm -rf .installed >> /dev/null 2>&1
+ /bin/rm -rf .repo* >> /dev/null 2>&1
+ /bin/echo "" > .zzexport .def=
+
+else
+ if [ -e $pkg ]; then
+ /bin/rm -rf $pkg
+ mkdir $pkg
+ else
+ /bin/echo "Package '$pkg' is not currently installed"
+ exit 1
+ fi
+fi
+
+
+# Normal exit.
+exit 0
+
+
+
+#=============================================================================
+# Usage
+#=============================================================================
+
+Usage:
+ /bin/echo "Usage: pkgclean [-all] [-dist] [-init] <pkg>"
+ /bin/echo ""
+ /bin/echo " Where -all clean all packages"
+ /bin/echo " <pkg> package to be removed"
+
+exit 0
diff --git a/util/pkgconfig b/util/pkgconfig
new file mode 100755
index 00000000..e5e6c513
--- /dev/null
+++ b/util/pkgconfig
@@ -0,0 +1,101 @@
+#!/bin/sh
+#
+# PKGCONFIG -- Re-create the system Makefile to take into account new
+# packages.
+
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+/bin/echo "Initializing repository data ...."
+$iraf/util/pkginit # init repository information
+if (( $? == 1 )); then
+ exit
+fi
+
+# Create the template Makefile.
+/bin/echo "Creating system makefile ...."
+cat << MAKE_TEMP_END > Makefile
+#
+# Makefile for IRAF external package installation/maintenance.
+#
+# ---------------------------------------------------------------------------
+
+# Compiler Flags.
+
+RELEASE = `cat ../.version`
+
+all:: update
+
+# Update recent changes from the repository.
+update::
+ @./configure
+ @../util/pkgupdate -all
+
+# Install all available packages for this platform.
+install_all::
+ @../util/pkgall
+
+# List packages available on the repository.
+list::
+ @cat .repo_pkgs
+
+# Clean the IRAF tree of binaries for the currently configured arch.
+init::
+ @../util/pkgclean -init
+
+# Remove all package code but leave the structure in place.
+clean::
+ @../util/pkgclean -all
+
+# Restore the dynamic package directory to its distribution state.
+distclean::
+ @../util/pkgclean -init
+
+# Check to see which installed packages could be updated.
+check::
+ @../util/pkgupdate -list
+
+# Update recent changes from the repository.
+self_update::
+ @../util/pkgupdate -self
+ @./configure
+
+
+MAKE_TEMP_END
+
+echo "Setup Complete."
+
+
+
+# For each package we have, append a makefile entry.
+pkg=`cat .repo_pkgs`
+for p in ${pkg[@]} ; do
+
+ # Create template makefile entries for each package
+ /bin/echo "${p}::" >> Makefile
+ /bin/echo " @../util/pkginst $p" >> Makefile
+ /bin/echo "clean_${p}::" >> Makefile
+ /bin/echo " @../util/pkgclean $p" >> Makefile
+ /bin/echo "update_${p}::" >> Makefile
+ /bin/echo " @../util/pkgupdate $p" >> Makefile
+ /bin/echo "" >> Makefile
+
+ # Create the directory
+ if [ -e "$p" ]; then
+ /bin/rm -rf $p
+ fi
+ mkdir $p
+done
+
+/bin/echo ""
+exit 0
diff --git a/util/pkgdel b/util/pkgdel
new file mode 100755
index 00000000..f7d52568
--- /dev/null
+++ b/util/pkgdel
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# PKGDEL -- Delete an external package from the dynamic directory.
+
+
+bindir="`dirname $0`" # get iraf root
+irafdir=${bindir%/*}
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source ../unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+if [ -e $1 ]; then
+ /bin/rm -rf $1 >> /dev/null 2>&1
+fi
+
+exit 0
diff --git a/util/pkgenv b/util/pkgenv
new file mode 100755
index 00000000..af227ff4
--- /dev/null
+++ b/util/pkgenv
@@ -0,0 +1,16 @@
+#!/bin/bash
+#
+# PKGENV -- Initialize the package environment
+
+
+/bin/rm -f .installed .zzsetenv.def
+
+files=`cat .repo_pkgs`
+for p in ${files[@]} ; do
+
+ if [ -e $p/.installed ]; then
+ cat $p/.installed >> .installed
+ /bin/echo "re$p ="`pwd`"/$p/" >> .zzsetenv.def
+ fi
+done
+/bin/echo "keep" >> .zzsetenv.def
diff --git a/util/pkgget b/util/pkgget
new file mode 100755
index 00000000..fba02c04
--- /dev/null
+++ b/util/pkgget
@@ -0,0 +1,177 @@
+#!/bin/bash
+#
+# PKGGET -- Download the specified URL to the current directory. We use
+# a command specific to the system we're on. We assume the URL has been
+# properly escaped in the argument list.
+#
+# Usage: pkgget [-h] [-n] [-v] url
+#
+# Where -n no-op flag
+# -v verbose output
+# -h this message
+#
+# Example:
+# % pkgget -q ftp://iraf.noao.edu/iraf/extern/foo-linux.tar.gz
+#
+# ----------------------------------------------------------------------------
+
+
+export PATH=../util:$PATH
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source ../unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+# Utility aliases.
+source ${iraf}/unix/hlib/util.sh
+
+
+
+##############################################################################
+# START OF MACHDEP DEFINITIONS.
+##############################################################################
+
+# MACHDEP definitions which may be reset below.
+VERSION=`cat ../.version`
+
+
+#----------------------------------
+# Determine platform architecture.
+#----------------------------------
+
+UNAME=""
+if [ -e /usr/bin/uname ]; then
+ uname_cmd=/usr/bin/uname
+ UNAME=`/usr/bin/uname | tr '[A-Z]' '[a-z]'`
+elif [ -e /bin/uname ]; then
+ uname_cmd=/bin/uname
+ UNAME=`/bin/uname | tr '[A-Z]' '[a-z]'`
+else
+ WARNING "No 'uname' command found to determine architecture."
+ exit 1
+fi
+
+case $UNAME in
+ "linux" | "linux64")
+ dlcmd="/usr/bin/wget"
+ ;;
+ "darwin" | "macosx" | "macintel" | "ipad") # Mac OSX/iOS
+ #dlcmd="/usr/bin/ftp -A"
+ dlcmd="/usr/bin/ftp"
+ ;;
+
+ # Other architectures to be added here
+
+ *)
+ ERRMSG "Unable to determine platform architecture."
+ exit 1
+ ;;
+esac
+
+# If we don't have a download command installed, use our own .....
+if [ ! -e $dlcmd ]; then
+ dlcmd=`dirname $0`/fget
+fi
+
+##############################################################################
+# END OF MACHDEP DEFINITIONS.
+##############################################################################
+
+#=============================================================================
+# Declarations and initializations.
+#=============================================================================
+
+exec=yes
+verb=no
+url=""
+
+
+# Process cmdline flags.
+while [ -n "$1" ]; do
+ case "$1" in
+ "-n") # no execute
+ exec=no
+ ;;
+ "-v") # be chatty
+ verb=yes
+ quiet=no
+ ;;
+ "-h") # print help summary
+ /bin/echo "Usage: pkgget [-h] [-n] [-q | -v] url"
+ /bin/echo ""
+ /bin/echo " where -n # no execute"
+ /bin/echo " -q # suppress output"
+ /bin/echo " -v # verbose output"
+ /bin/echo " -h # this message"
+ exit 0
+ ;;
+
+ *)
+ url=$1
+ break
+ esac
+
+ if [ -n "$2" ]; then
+ shift
+ else
+ break
+ fi
+done
+
+
+# Error checks.
+if [ -z "$url" ]; then
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "ERROR: URL not specified"
+ fi
+ exit 1
+fi
+
+
+# Do it.
+if [ "$exec" == "yes" ]; then
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "Downloading "$url" ...."
+ fi
+
+ if [ "$verb" == "no" ]; then
+ $dlcmd ${url} >> /dev/null 2>&1
+ else
+ $dlcmd $url
+ fi
+
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "done"
+ fi
+fi
+
+
+# Verify we have the file.
+if [ ! -e ${url##*/} ]; then
+ if [ "$verb" == "yes" ]; then
+ /bin/echo "Error downloading file '"${url##*/}"'"
+ fi
+ exit 1
+
+else
+ if (( $#>1 )); then
+ mv ${url##*/} $2
+ fi
+fi
+
+# Normal exit.
+exit 0
+
+
+
+#=============================================================================
+# Usage
+#=============================================================================
diff --git a/util/pkginit b/util/pkginit
new file mode 100755
index 00000000..a484d522
--- /dev/null
+++ b/util/pkginit
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# PKGINIT - Initialize the dynamic package directory by fetching the most
+# recent repository definition files.
+
+bindir="`dirname $0`" # get iraf root directory
+irafdir=${bindir%/*}
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source ../unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+REPO=`${irafdir}/util/pkgrepo` # get repo url
+man=".repo_manifest"
+arch=`${irafdir}/unix/hlib/irafarch.sh -actual`
+
+
+$irafdir/util/pkgget ${REPO}/REPO.MANIFEST .repo_manifest
+if (( $?>0 )); then
+ /bin/echo "Cannot download repository manifest file, quitting."
+ exit $?
+fi
+
+$irafdir/util/pkgget ${REPO}/REPO.DESC .repo_desc
+if (( $?>1 )); then
+ /bin/echo "Cannot download repository description file, quitting."
+ exit $?
+fi
+
+
+# Create a list of packages available for the current platform. We pull
+# out the list from the repository manifest of all packages. If we have
+# IRAFARCH defined, assumed we're interested in managing multiple
+# architectures so don't filter by the current architecture.
+
+if [ -n "$IRAFARCH" ]; then
+ cat $man | egrep -v "^#" | awk '{printf("%s\n", $2)}' | uniq > .repo_pkgs
+ cat $man > .repo_local
+else
+ cat $man | grep "${arch}\ " | awk '{printf("%s\n", $2)}' > .repo_pkgs
+ cat $man | grep "${arch}\ " > .repo_local
+fi
+
+
+exit 0
diff --git a/util/pkginst b/util/pkginst
new file mode 100755
index 00000000..d4a83a24
--- /dev/null
+++ b/util/pkginst
@@ -0,0 +1,97 @@
+#!/bin/bash
+#
+# PKGINST - Install the named package.
+
+if (( $#<1 )); then
+ exit 0
+else
+ pkg=$1
+fi
+
+bindir="`dirname $0`" # get iraf root directory
+irafdir=${bindir%/*}
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source ../unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+REPO=`${irafdir}/util/pkgrepo`
+if [ -n "$IRAFARCH" ]; then
+ arch=$IRAFARCH
+else
+ arch=`${irafdir}/unix/hlib/irafarch.sh -actual`
+fi
+
+/bin/echo "Setting architecture: '$arch' .... "
+
+
+# Get any dependency package names.
+deps=`grep ^$pkg .repo_desc | awk '{printf("%s\n",$2)}' | sed -e 's/,/ /g'`
+pkg_dep=""
+for d in ${deps[@]}; do
+ if [ "$d" != "none" ]; then
+ /bin/echo "Adding dependency '$d' ...."
+ pkg_dep="$pkg_dep $d"
+ fi
+done
+
+# Make a unique list of package, i.e. remove multiple instances of a package.
+# [Note: Not used, the manifest should have this already. ]
+list=`/bin/echo $pkg_dep $pkg|awk 'BEGIN {RS=" |\n";}{print $1;}'|sort|uniq`
+
+# Process the requested package and any dependencies.
+dep=("$pkg_dep" "$pkg")
+for ip in ${dep[@]}; do
+
+ pfile=`grep \ $ip\ .repo_manifest | grep ${arch}\ | head -1 | awk '{printf("%s\n",$4)}'`
+
+ /bin/echo $pfile | grep src.tar.gz >> /dev/null 2>&1
+ if (( $?==0 )); then
+ src_only=1
+ else
+ src_only=0
+ fi
+
+ # Remove an existing package file.
+ if [ -e $pfile ]; then
+ /bin/rm -f $pfile
+ fi
+
+ # Download the repo file and unpack it.
+ /bin/echo -n "Installing package '$ip' .... "
+ ${irafdir}/util/pkgget ${REPO}/$pfile
+ if (( $?>0 )); then
+ /bin/echo " [Error]"
+ exit $?
+ fi
+
+ if [ -e $pfile ]; then
+
+ tar zxf $pfile
+ /bin/rm -f $pfile
+ /bin/echo `date +%s`" " ${ip}.${arch} > $ip/.installed.${arch}
+ /bin/echo `date +%s`" " $ip > $ip/.installed
+
+ if (( $src_only>0 )); then
+ /bin/echo " [SOURCE ONLY]"
+ /bin/echo `date +%s`" " $ip > $ip/.src_only
+ else
+ /bin/echo " [OK]"
+ fi
+ else
+ /bin/echo " [Error]"
+ fi
+
+ ${irafdir}/util/pkgenv -init
+
+done
+
+exit 0
diff --git a/util/pkgrepo b/util/pkgrepo
new file mode 100755
index 00000000..1f521c6f
--- /dev/null
+++ b/util/pkgrepo
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# PKGREPO - Get the repository base URI, either from the environment
+# variable 'IRAF_REPO' or the default.
+
+
+if [ -z "$IRAF_REPO" ]; then
+ /bin/echo "ftp://iraf.noao.edu/iraf/v216/REPO"
+else
+ /bin/echo $IRAF_REPO
+fi
+
+exit 0
diff --git a/util/pkgupdate b/util/pkgupdate
new file mode 100755
index 00000000..ea73ec1b
--- /dev/null
+++ b/util/pkgupdate
@@ -0,0 +1,121 @@
+#!/bin/bash
+#
+# PKGUPDATE - Update the named packages
+
+
+pkg=""
+all=no
+list_only=no
+
+if (( $#<1 )); then
+ exit 0
+else
+ # Process cmdline flags.
+ while [ -n "$1" ]; do
+ case "$1" in
+ "-all") # clean all package .s
+ all=yes
+ ;;
+ "-list") # list packages needing updating
+ list_only=yes
+ ;;
+ *)
+ pkg=$1
+ break
+ ;;
+ esac
+
+ shift
+ done
+fi
+
+
+bindir="`dirname $0`" # get iraf root directory
+irafdir=${bindir%/*}
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source ../unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+
+REPO=`${irafdir}/util/pkgrepo`
+if [ -n "$IRAFARCH" ]; then
+ arch=$IRAFARCH
+else
+ arch=`${irafdir}/unix/hlib/irafarch.sh -actual`
+fi
+
+/bin/echo "Updating repository data ...."
+../util/pkginit # init repository information
+
+# Check for a self-update.
+if [ "$pkg" == "-self" ]; then
+ /bin/echo "Updating utility scripts ...."
+ /bin/rm -f /tmp/util.tgz
+ ../util/pkgget ${REPO}/util-universal.tar.gz /tmp/util.tgz
+ (cd ../util; tar zxf /tmp/util.tgz; /bin/rm -f /tmp/util.tgz)
+ /bin/echo "Done"
+ exit 0
+fi
+
+# Check for a extern update.
+if [ "$pkg" == "-config" ]; then
+ /bin/echo "Updating config script ...."
+ ../util/pkgget ${REPO}/config-universal configure
+ chmod 777 configure
+ /bin/echo "Done"
+ exit 0
+fi
+
+
+
+# Process the requested package and any dependencies.
+pkgs=`cat .repo_pkgs`
+for ip in ${pkgs[@]}; do
+
+ if [ -e $ip/.installed ]; then
+
+ pd=`grep $ip $ip/.installed | awk '{printf("%s\n", $1)}'`
+ rd=`grep $ip .repo_manifest | head -1 | awk '{printf("%s\n", $3)}'`
+
+ alist=`(cd $ip; ls -1 .inst*.* | sed -e "s/\.installed\.//g")`
+
+ if (( $rd>$pd )); then
+
+ # Update each installed architecture automatically.
+ for a in ${alist[@]}; do
+
+ if [ "$list_only" == "yes" ]; then
+ printf "Package %-12s for %-8s is out of date ....\n" $ip $a
+ else
+ if [ "$all" == "yes" -o "$ip" == "$pkg" ]; then
+ /bin/echo "Updating package '$ip' for '$a' ...."
+ ../util/pkginst $ip
+ fi
+ fi
+ done
+
+ else
+ if [ "$list_only" == "yes" ]; then
+ printf "Package %-12s is current ....\n" $ip
+ elif (( $rd<=$pd )); then
+ printf "Package %-12s is current ....\n" $ip
+ fi
+ fi
+
+ else
+ printf "Package %-12s is not installed ....\n" $ip
+ fi
+
+ ${irafdir}/util/pkgenv -init
+done
+
+/bin/echo "Done"
+exit 0
diff --git a/util/self_update b/util/self_update
new file mode 100755
index 00000000..f5896d44
--- /dev/null
+++ b/util/self_update
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# SELF_UPDATE - Update the update scripts.
+
+
+# Initialize the $iraf and environment.
+if [ -z "$iraf" ]; then
+ if [ -e "$HOME/.iraf/setup.sh" ]; then
+ source $HOME/.iraf/setup.sh
+ else
+ source unix/hlib/setup.sh
+ fi
+else
+ source $iraf/unix/hlib/setup.sh
+fi
+
+source $iraf/unix/hlib/irafuser.sh
+
+cd $iraf/util
+
+REPO=`${iraf}/util/pkgrepo`
+if [ -n "$IRAFARCH" ]; then
+ arch=$IRAFARCH
+else
+ arch=`${iraf}/unix/hlib/irafarch.sh -actual`
+fi
+
+
+/bin/echo -n "Updating utility scripts ...."
+
+# Delete any existing downloads.
+if [ -e /tmp/util.tgz ]; then
+ /bin/rm -f /tmp/util.tgz
+fi
+
+# Get the latest script distribution.
+./fget -o /tmp/util.tgz ${REPO}/util-universal.tar.gz
+
+# Go to iraf root, unpack and clean up. Using the IRAF root gives us
+# the chance to update the toplevel Makefile or other build scripts in
+# the system, e.g. in the 'vendor' directory.
+(cd ../; tar zxf /tmp/util.tgz; /bin/rm -f /tmp/util.tgz )
+
+# Edit the current IRAF path into the scripts.
+cd $iraf/unix/hlib
+pfiles=("cl.sh" "cl.csh" "ecl.sh" "ecl.csh" "vocl.sh" "vocl.csh" "setup.sh" "setup.csh" "mkiraf.sh" "mkiraf.csh")
+d_iraf="/iraf/iraf/"
+TEMP="/tmp/iraf_update.$$"
+/bin/rm -f $TEMP
+
+for file in ${pfiles[@]}; do
+ sed -e "s+$d_iraf+$iraf+" $file > $TEMP
+ mv $TEMP $file
+done
+cd $iraf
+/bin/echo "Done"
+
+exit 0