#!/bin/csh -f # # PKGINIT - Initialize the dynamic package directory by fetching the most # recent repository definition files. unalias grep set bindir = "`dirname $0`" # get iraf root directory set irafdir = $bindir:h set REPO = `${irafdir}/util/pkgrepo` # get repo url set man = ".repo_manifest" set arch = `${irafdir}/unix/hlib/irafarch.csh -actual` $irafdir/util/pkgget ${REPO}/REPO.MANIFEST .repo_manifest if ($status == 1) then echo "Cannot download repository manifest file, quitting." exit $status endif $irafdir/util/pkgget ${REPO}/REPO.DESC .repo_desc if ($status == 1) then echo "Cannot download repository description file, quitting." exit $status endif # 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 ($?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 endif exit 0