From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- unix/hlib/util.csh/self_update | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 unix/hlib/util.csh/self_update (limited to 'unix/hlib/util.csh/self_update') 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 -- cgit