diff --git a/util/download_events.sh b/util/download_events.sh index 9abecf64a2f2c6f938b9f27f0582f9ad269aa427..3cf10fe626f43f31b1fde444c5f4153bb7be793c 100755 --- a/util/download_events.sh +++ b/util/download_events.sh @@ -11,6 +11,21 @@ echo "Download generator artifacts for one or more of the physics processes" PROCS=() BRANCH="dvmp" +function print_the_help { + echo "USAGE: $0 [-c config [[-c config ...]] script1 [script2...]" + echo "OPTIONS:" + echo " -p,--process Physics process name (can be defined multiple + times)." + echo " -b,--branch Git branch to download artifacts from (D: + $BRANCH)" + echo " -h,--help Print this message" + echo "" + echo " This script will download the relevant generator artifacts needed" + echo " for local testing of the benchmarks." + exit +} + + while [ $# -gt 0 ] do key="$1" @@ -25,6 +40,10 @@ do shift # past argument shift # past value ;; + -h|--help) + print_the_help + shift + ;; *) # unknown option echo "unknown option" exit 1 @@ -40,6 +59,9 @@ fi for proc in ${PROCS[@]}; do echo "Dowloading artifacts for $proc (branch: $BRANCH)" wget https://eicweb.phy.anl.gov/EIC/benchmarks/physics_benchmarks/-/jobs/artifacts/$BRANCH/download?job=${proc}:jpsi_central:generate -O results.zip + echo "Unpacking artifacts..." unzip -u results.zip + echo "Cleaning up..." rm results.zip done +echo "All done"