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/util.csh/self_update | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/hlib/util.csh/self_update')
-rwxr-xr-x | unix/hlib/util.csh/self_update | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/unix/hlib/util.csh/self_update b/unix/hlib/util.csh/self_update new file mode 100755 index 00000000..9ba35b43 --- /dev/null +++ b/unix/hlib/util.csh/self_update @@ -0,0 +1,37 @@ +#!/bin/csh -f +# +# SELF_UPDATE - Update the update scripts. + +unalias grep ls + +set iraf = $cwd/ +source $iraf/unix/hlib/irafuser.csh + +chdir $iraf/util + +set REPO = `${iraf}/util/pkgrepo` +if ($?IRAFARCH) then + set arch = $IRAFARCH +else + set arch = `${iraf}/unix/hlib/irafarch.csh -actual` +endif + + +echo -n "Updating utility scripts ...." + +# Delete any existing downloads. +if (-e /tmp/util.tgz) then + /bin/rm -f /tmp/util.tgz +endif + +# 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. +(chdir ../ ; tar zxf /tmp/util.tgz ; /bin/rm -f /tmp/util.tgz ) + +echo "Done" + +exit 0 |