#!/bin/sh #-------------------------------------------------------- # a routine to initialize the cvs area for a new package # # Usage: # # initialize_package [-e] # #---------------------------------------------------------- #UPS_SHELL=sh; export UPS_SHELL #. `$UPS_DIR/bin/ups setup ups` . $SETUPS_DIR/setups.sh setup cdfsoft2 development cvsroot cdfw sshagent EDIT='' eopt='' istchr=`echo ${1}|cut -c1` if [ "${istchr}" = '-' ]; then eopt=${1} if [ "${eopt}" = '-e' ]; then EDIT=EDIT shift fi fi if [ ${#*} -lt 1 ]; then echo Usage: echo $0 '' '' echo '' echo Where list-of-users is the space delimited list of those echo " " users to be granted write access to the new package. exit 1 fi #my_dir=`pwd` [ -f /bin/tildefix$$ ] && rm /tmp/tildefix$$ echo /bin/echo \$1 > /tmp/tildefix$$ my_dir=`csh -f /tmp/tildefix$$ ~debaun`/cdf_util rm /tmp/tildefix$$ if [ "${my_dir}" = "/cdf_util" ]; then echo "User debaun is not known" exit 1 fi work=`$my_dir/define_work_area` if [ x${work} = x ]; then echo '++' echo '++' Unable to initialize work space exit 1 fi # ------------------------------------------- # Create the directory in CVS space manually #-------------------------------------------- Package=${1} shift User_String='' if [ ${#*} != 0 ] ; then User_String=${1} shift fi while [ ${#*} != 0 ] do User_String=${User_String}':'${1} shift done echo '===========================================================' echo Issue the following after login as cdfcvs \(cut and paste\) echo '===========================================================' echo '' echo cd run2 echo mkdir $Package echo touch $Package/commitlog echo exit echo '' ssh -l cdfcvs cdfcvs #rsh cdfsga -l cdfcvs "cd run2; mkdir $Package; touch $Package/commitlog" #------------------------------------- # Add package to administrative files #------------------------------------- cd ${work} rm -r test* mkdir testrel cd testrel cvs -Q checkout CVSROOT cd CVSROOT DUP=`grep "^$Package " modules` if [ X"$DUP" != "X" ]; then echo "Package $Package exists already" exit fi P=`echo $Package|cut -c1` $my_dir/add2_module $Package $my_dir/add2_check_access $Package $User_String $EDIT #echo '' #echo '==================================================================' #echo Cut the following line for pasting into file - hit enter when done #echo '' #echo $Package \$CVSROOT/CVSROOT/log email-list -f \$CVSROOT/$Package/commitlog %s #echo '==================================================================' #set reply=`$HOME/cdf_util/cdf_gets` $my_dir/add2_loginfo $Package $User_String $EDIT cvs commit -m "Added $Package" #-------------------------------------------- # Make ups sub-directory and dummy table file #-------------------------------------------- cd .. cvs -Q checkout $Package if [ ! -d $Package ]; then echo '' echo 'Error: package' $Package has not been properly created in echo 'the cvs repository. Please correct previous errors.' echo '' exit fi cd $Package mkdir ups cvs -Q add ups cd ups cp $CDFSOFT2_DIR/AbsEnv/ups/AbsEnv.table $Package.table cvs -Q add $Package.table cd .. mkdir $Package cvs -Q add $Package cd $Package cat > README << IeOg Description of ${Package}/${Package} directory --------------------------------------------- This area should contain only include-path files such as: *.h *.hh *.inc link_${Package}.mk for PackageList IeOg cvs -Q add README cd .. cvs commit -m "Added ups/table file and $Package directory for $Package" cd $my_dir Add_package_2_error_logger $eopt $Package cd $work rm -r $work/*