#!/bin/sh # # make_release_current release # test=`echo $BFDIST|grep $HOME` if [ x$test = x ] then echo echo "you MUST login as cdfsoft to run this." echo "Try again." echo exit fi new_release=$1 if [ x$new_release = x ] then echo echo "Usage: $0 new_release" echo exit fi old_release=`ups list -c -KVERSION cdfsoft2|sed 's%"%%g'` cd $BFDIST/releases if [ ! -d $new_release ] then echo '' echo " $BFDIST/releases/$new_release does not exist." echo " No action taken." echo '' exit fi if [ x$old_release != x ] then if [ ! -d $old_release ] then echo '' echo '******************************************************************' echo " $BFDIST/releases/$old_release does not exist." echo " It is likely that something is awry with the ups files." echo " Please look into why ups says $old_release is current," echo " but the release does not exist in the usual location." echo '******************************************************************' exit fi echo rm old rm old echo ln -s $old_release old ln -s $old_release old echo ups undeclare -c cdfsoft2 ups undeclare -c cdfsoft2 echo ups declare -o cdfsoft2 $old_release ups declare -o cdfsoft2 $old_release fi echo rm current rm current echo ln -s $new_release current ln -s $new_release current echo ups declare -c cdfsoft2 $new_release ups declare -c cdfsoft2 $new_release