|
81 | 81 | --cvmfs) dataRetrieval=cvmfs ;; |
82 | 82 | --lfs) dataRetrieval=lfs ;; |
83 | 83 | --clasweb) dataRetrieval=clasweb ;; |
| 84 | + --xrootd) dataRetrieval=xrootd ;; |
84 | 85 | --clara) installClara=true ;; |
85 | 86 | --data) downloadData=true ;; |
86 | 87 | -h|--help) |
@@ -157,6 +158,30 @@ command_exists () { |
157 | 158 | type "$1" &> /dev/null |
158 | 159 | } |
159 | 160 |
|
| 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 | + |
160 | 185 | # print retrieval notice |
161 | 186 | notify_retrieval() { |
162 | 187 | echo "Retrieving $1 from $2 ..." |
@@ -202,34 +227,10 @@ download_map () { |
202 | 227 | return $ret |
203 | 228 | } |
204 | 229 |
|
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 | | - |
229 | 230 | # download the default field maps, as defined in libexec/env.sh: |
230 | 231 | # (and duplicated in etc/services/reconstruction.yaml): |
231 | 232 | if $downloadMaps; then |
232 | | - case $dataRetrieval |
| 233 | + case $dataRetrieval in |
233 | 234 | lfs) |
234 | 235 | notify_retrieval 'field maps' 'lfs' |
235 | 236 | download_lfs etc/data/magfield |
|
0 commit comments