Skip to content

Commit 34c4716

Browse files
committed
fix: typo and make --xrootd usage fail
1 parent 78619ca commit 34c4716

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

build-coatjava.sh

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ do
8181
--cvmfs) dataRetrieval=cvmfs ;;
8282
--lfs) dataRetrieval=lfs ;;
8383
--clasweb) dataRetrieval=clasweb ;;
84+
--xrootd) dataRetrieval=xrootd ;;
8485
--clara) installClara=true ;;
8586
--data) downloadData=true ;;
8687
-h|--help)
@@ -157,6 +158,30 @@ command_exists () {
157158
type "$1" &> /dev/null
158159
}
159160

161+
# check data-retrieval options, and prepare accordingly
162+
case $dataRetrieval in
163+
lfs)
164+
if ! command_exists git-lfs ; then
165+
echo 'ERROR: `git-lfs` not found; please install it, or use a different data-retrieval option other than `--lfs`' >&2
166+
exit 1
167+
fi
168+
git lfs install
169+
;;
170+
cvmfs)
171+
path=/cvmfs/oasis.opensciencegrid.org/jlab
172+
if [ ! -d $path ]; then
173+
echo "ERROR: cannot find CVMFS path '$path'; data retrieval option \`--cvmfs\` failed" >&2
174+
exit 1
175+
fi
176+
;;
177+
clasweb)
178+
;;
179+
*)
180+
echo "ERROR: data retrieval option '$dataRetrieval' is not supported" >&2
181+
exit 1
182+
;;
183+
esac
184+
160185
# print retrieval notice
161186
notify_retrieval() {
162187
echo "Retrieving $1 from $2 ..."
@@ -202,34 +227,10 @@ download_map () {
202227
return $ret
203228
}
204229

205-
# check data-retrieval options, and prepare accordingly
206-
case $dataRetrieval in
207-
lfs)
208-
if ! command_exists git-lfs ; then
209-
echo 'ERROR: `git-lfs` not found; please install it, or use a different data-retrieval option other than `--lfs`' >&2
210-
exit 1
211-
fi
212-
git lfs install
213-
;;
214-
cvmfs)
215-
path=/cvmfs/oasis.opensciencegrid.org/jlab
216-
if [ ! -d $path ]; then
217-
echo "ERROR: cannot find CVMFS path '$path'; data retrieval option \`--cvmfs\` failed" >&2
218-
exit 1
219-
fi
220-
;;
221-
clasweb)
222-
;;
223-
*)
224-
echo "ERROR: data retrieval option '$dataRetrieval' is not supported" >&2
225-
exit 1
226-
;;
227-
esac
228-
229230
# download the default field maps, as defined in libexec/env.sh:
230231
# (and duplicated in etc/services/reconstruction.yaml):
231232
if $downloadMaps; then
232-
case $dataRetrieval
233+
case $dataRetrieval in
233234
lfs)
234235
notify_retrieval 'field maps' 'lfs'
235236
download_lfs etc/data/magfield

0 commit comments

Comments
 (0)