Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:59

0001 #!/bin/bash
0002 
0003 set -euo pipefail
0004 
0005 ! [ "$(git status --porcelain)" ] || (echo "please commit everything before running"; git status; exit 1)
0006 
0007 voms-proxy-info | grep timeleft | grep -v -q 00:00:00 || (echo 'no proxy'; exit 1)
0008 
0009 (echo $STY > /dev/null) || (echo "run this on a screen"; exit 1)
0010 
0011 #hpnumber=
0012 hptype=hp   #or sm
0013 extraopts="--redirectproxy"
0014 
0015 #common=Configurations/common_cff_py_pickyours.txt
0016 #lstfile=DataFiles/pickyours.lst
0017 #IOVfile=IOV/RunYYYYYY
0018 #alignmentname=pick a name
0019 #niterations=pick a number
0020 
0021 [ -e $lstfile ] || (echo "$lstfile does not exist!"; exit 1)
0022 [ -e $common ] || (echo "$common does not exist!"; exit 1)
0023 [ -e $IOVfile ] || (echo "$IOVfile does not exist!"; exit 1)
0024 
0025 commitid=$(git rev-parse HEAD)
0026 
0027 git tag $hptype$hpnumber $commitid || (
0028   status=$?
0029   if [ $(git rev-parse HEAD) == $(git rev-parse $hptype$hpnumber) ]; then
0030     exit 0  #from the parentheses
0031   fi
0032   echo
0033   echo "failed to make the tag, see ^"
0034   echo
0035   echo "if you previously tried to start the alignment but it failed,"
0036   echo "you can delete the tag by doing"
0037   echo
0038   echo "  git tag --delete $hptype$hpnumber"
0039   echo
0040   exit $status
0041 )
0042 
0043 submitAndWatchHippy.sh $alignmentname \
0044                        $niterations \
0045                        $hptype$hpnumber \
0046                        $common \
0047                        Configurations/align_tpl_py.txt \
0048                        Configurations/TrackSelection \
0049                        $lstfile \
0050                        $IOVfile \
0051                        "$extraopts"