From 89e25aa5b3ce44391a7acfac0d8d0da0ba17a50c Mon Sep 17 00:00:00 2001 From: Sylvester Joosten <sjoosten@anl.gov> Date: Tue, 10 Nov 2020 18:51:00 +0000 Subject: [PATCH] Added help --- util/download_events.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/util/download_events.sh b/util/download_events.sh index 9abecf64..3cf10fe6 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" -- GitLab