diff options
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 |