diff --git a/bin/crvUps.sh b/bin/crvUps.sh new file mode 100755 index 0000000..d9b3cf2 --- /dev/null +++ b/bin/crvUps.sh @@ -0,0 +1,87 @@ +#! /bin/bash +# script to build CRVTeststand repo and package for UPS +# will check the repo and create directories in default dir +# +# $1 = CRVTeststand tag to build +# $2 = Offline version to setup to define compiler switches +# if missing, take current +# +# + +CTAG="$1" +if [ -z "$CTAG" ]; then + echo "ERROR - must provide a CRVTeststand tag" + exit 1 +fi + +source /cvmfs/mu2e.opensciencegrid.org/setupmu2e-art.sh +muse setup Offline $2 +RC=$? +if [ $RC -ne 0 ]; then + echo "ERROR - muse setup failed" + exit 1 +fi + +git clone https://github.com/Mu2e/CRVTeststand || exit 1 + +cd CRVTeststand || exit 1 + +echo "Checking out $CTAG ..." +git checkout -b build $CTAG || exit 1 + +make +RC=$? +if [ $RC -ne 0 ]; then + echo "ERROR - make failed" + exit 1 +fi + +FLAVOR=$(echo $SETUP_ROOT | awk '{print $4}') +ROOTSETUP=$(echo $SETUP_ROOT | awk '{print $1" "$2" "$3" "$4" "$7" "$8}') +# setupRequired("gcc $GCC_VERSION") + +mkdir -p upsd/CRVTeststand/$CTAG/ups +mkdir -p upsd/CRVTeststand/$CTAG/$FLAVOR +mkdir -p upsd/CRVTeststand/${CTAG}.version + +rsync -aur CRVTeststand/* upsd/CRVTeststand/$CTAG/$FLAVOR + +cat > upsd/CRVTeststand/$CTAG/ups/CRVTeststand.table < upsd/CRVTeststand/${CTAG}.version/$FLAVOR <