#!/usr/bin/env bash #----------------------------------------------------------------------- # usage: update_package package [tag] # # assume we are in the topmost dir of the test release # also assume presence of development on this machine #----------------------------------------------------------------------- source ~cdfsoft/cdf2.shrc version=`cat .base_release` setup cdfsoft2 $version export PACKAGE=$1 tag=$2 repository="NODEV" if [ -d $CDFSOFT2_DIR/../development/$PACKAGE/CVS/Root ] ; then repository=`cat $CDFSOFT2_DIR/../development/$PACKAGE/CVS/Root` fi if [ -d $PACKAGE ] ; then if [ ".$tag" == "." ] ; then #----------------------------------------------------------------------- # tag is not defined, figure out the default for this release #----------------------------------------------------------------------- tag=`cat $CDFSOFT2_DIR/Release/Releases/${version}.newrel | \ awk '{if ($1 == ENVIRON["PACKAGE"]) print $2}'` fi echo tag=.$tag. if [ ".$repository" == ".NODEV" ] ; then echo cvs co -r $tag $PACKAGE cvs co -r $tag $PACKAGE else echo cvs -d $repository co -r $tag $PACKAGE cvs -d $repository co -r $tag $PACKAGE fi else echo addpkg $PACKAGE $tag addpkg $PACKAGE $tag fi unset PACKAGE