Skip to content

Commit 7df1a6f

Browse files
committed
Revert "remove clara tarball option (#1462)"
This reverts commit 2252c31.
1 parent 2074f57 commit 7df1a6f

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: build
7373
run: |
7474
./build-coatjava.sh --lfs --no-progress -T${{ env.nthreads }}
75-
./bin/install-clara -c ./coatjava ./clara
75+
./bin/install-clara -b -c ./coatjava ./clara
7676
- name: tar # tarball to preserve permissions
7777
run: |
7878
tar czvf coatjava.tar.gz coatjava
@@ -102,7 +102,7 @@ jobs:
102102
- name: build
103103
run: |
104104
./build-coatjava.sh --lfs --no-progress -T${{ env.nthreads }}
105-
./bin/install-clara -c ./coatjava ./clara
105+
./bin/install-clara -b -c ./coatjava ./clara
106106
- name: tar # tarball to preserve permissions
107107
run: |
108108
tar czvf coatjava.tar.gz coatjava

‎bin/install-clara‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ trap cleanup EXIT
7171
# Configure:
7272
debug=0
7373
args=()
74-
usage="Usage: install-clara [-v] [-c COATJAVA] [-f CLARA] [-g GRAPES] PATH"
74+
usage="Usage: install-clara [-v] [-b] [-c COATJAVA] [-f CLARA] [-g GRAPES] PATH"
7575
info="""
7676
- The default CLARA / GRAPES versions are $clara / $grapes
7777
- COATJAVA can also be specified as a local installation directory
7878
- If the COATJAVA version is not specified, it will try to auto-detect it.
79-
- [-v adds verbosity and disables cleanup]"""
79+
- [-v adds verbosity and disables cleanup]
80+
- [-b builds clara from source]"""
8081

8182
while [[ $# -gt 0 ]]
8283
do
@@ -85,6 +86,7 @@ do
8586
-f) clara="$2" && shift && shift ;;
8687
-c) coatjava="$2" && shift && shift ;;
8788
-g) grapes="$2" && shift && shift ;;
89+
-b) build=1 && shift ;;
8890
-v) let debug=$debug+1 && shift ;;
8991
-*|--*) echo -e "$usage\n\nUnknown option: $1" && exit 1 ;;
9092
*) args+=("$1") && shift ;;
@@ -124,8 +126,14 @@ tmp_dir=$(cd $tmp_dir && pwd)
124126
cd $tmp_dir
125127

126128
# CLARA:
127-
echo -e "\nBuilding CLARA from source ..."
128-
build_clara $PWD/clara-cre
129+
if ! [ -z ${build+x} ]
130+
then
131+
echo -e "\nBuilding CLARA from source ..."
132+
build_clara $PWD/clara-cre
133+
else
134+
echo -e "\nRetrieving CLARA version $clara ..."
135+
get https://clasweb.jlab.org/clas12offline/distribution/clara/clara-cre-$clara.tar.gz
136+
fi
129137

130138
# COATJAVA:
131139
if ! compgen -G "$coatjava/lib/clas/coat-libs-*.jar" > /dev/null

0 commit comments

Comments
 (0)