Skip to content

Commit

Permalink
go_check and go_update: -b branch(=develop) and -r run(=1296) defaults
Browse files Browse the repository at this point in the history
Moreover, only update downloaded files if changed upstream.
  • Loading branch information
wdconinc committed Jun 28, 2019
1 parent 8acdeb9 commit a7106a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
13 changes: 6 additions & 7 deletions Tests/go_check.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
#!/bin/bash

function usage() {
echo "Usage: $0 [-h] [-r run]"
echo "Usage: $0 [-h] [-r run=1296] [-b branch=develop]"
}

if [ $# -lt 2 ] ; then
usage
fi

while getopts “:h:r:” opt; do
run=1296
branch=develop
while getopts “:h:r:g:” opt; do
case $opt in
h) usage && exit ;;
r) run=$OPTARG ;;
b) branch=$OPTARG ;;
*) usage && exit ;;
esac
done
Expand All @@ -27,6 +26,6 @@ fi
make -C build && build/qwparity -c prex.conf -r $run -e :2k

if [ ! -f prexALL_${run}.root ] ; then
wget http://hallaweb.jlab.org/12GeV/Moller/downloads/japan/develop/prexALL_${run}.root
wget -c -N http://hallaweb.jlab.org/12GeV/Moller/downloads/japan/${branch}/prexALL_${run}.root
fi
root-diff -k evt,mul prexALL_${run}.root ${QW_ROOTFILES}/prexALL_${run}.root
3 changes: 2 additions & 1 deletion Tests/go_update.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash

function usage() {
echo "Usage: $0 [-h] [-r run]"
echo "Usage: $0 [-h] [-r run=1296]"
}

if [ $# -lt 2 ] ; then
usage
fi

run=1296
while getopts “:h:r:” opt; do
case $opt in
h) usage && exit ;;
Expand Down

0 comments on commit a7106a9

Please sign in to comment.