From 733a1c894cae297752420ad6fc7413f9bcf05edd Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Thu, 1 Oct 2026 11:44:43 -0400 Subject: [PATCH] Revert "remove clara tarball option (#1462)" This reverts commit 2252c31c64401fdb50b59c67df021b4f6d182561. --- .github/workflows/ci.yml | 4 ++-- bin/install-clara | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c32b30722..65f3be805d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,7 +72,7 @@ jobs: - name: build run: | ./build-coatjava.sh --lfs --no-progress -T${{ env.nthreads }} - ./bin/install-clara -c ./coatjava ./clara + ./bin/install-clara -b -c ./coatjava ./clara - name: tar # tarball to preserve permissions run: | tar czvf coatjava.tar.gz coatjava @@ -102,7 +102,7 @@ jobs: - name: build run: | ./build-coatjava.sh --lfs --no-progress -T${{ env.nthreads }} - ./bin/install-clara -c ./coatjava ./clara + ./bin/install-clara -b -c ./coatjava ./clara - name: tar # tarball to preserve permissions run: | tar czvf coatjava.tar.gz coatjava diff --git a/bin/install-clara b/bin/install-clara index 48b3ffb44e..d510db20f3 100755 --- a/bin/install-clara +++ b/bin/install-clara @@ -71,12 +71,13 @@ trap cleanup EXIT # Configure: debug=0 args=() -usage="Usage: install-clara [-v] [-c COATJAVA] [-f CLARA] [-g GRAPES] PATH" +usage="Usage: install-clara [-v] [-b] [-c COATJAVA] [-f CLARA] [-g GRAPES] PATH" info=""" - The default CLARA / GRAPES versions are $clara / $grapes - COATJAVA can also be specified as a local installation directory - If the COATJAVA version is not specified, it will try to auto-detect it. -- [-v adds verbosity and disables cleanup]""" +- [-v adds verbosity and disables cleanup] +- [-b builds clara from source]""" while [[ $# -gt 0 ]] do @@ -85,6 +86,7 @@ do -f) clara="$2" && shift && shift ;; -c) coatjava="$2" && shift && shift ;; -g) grapes="$2" && shift && shift ;; + -b) build=1 && shift ;; -v) let debug=$debug+1 && shift ;; -*|--*) echo -e "$usage\n\nUnknown option: $1" && exit 1 ;; *) args+=("$1") && shift ;; @@ -124,8 +126,14 @@ tmp_dir=$(cd $tmp_dir && pwd) cd $tmp_dir # CLARA: -echo -e "\nBuilding CLARA from source ..." -build_clara $PWD/clara-cre +if ! [ -z ${build+x} ] +then + echo -e "\nBuilding CLARA from source ..." + build_clara $PWD/clara-cre +else + echo -e "\nRetrieving CLARA version $clara ..." + get https://clasweb.jlab.org/clas12offline/distribution/clara/clara-cre-$clara.tar.gz +fi # COATJAVA: if ! compgen -G "$coatjava/lib/clas/coat-libs-*.jar" > /dev/null