@@ -22,7 +22,7 @@ LSST_LFS_VERSION=${LSST_LFS_VERSION:-2.4.2}
22
22
LSST_BUILD_GITREV=${LSST_BUILD_GITREV:- main}
23
23
LSST_BUILD_GITREPO=${LSST_BUILD_GITREPO:- https:// github.com/ lsst/ lsst_build.git}
24
24
LSST_SCIPIPECENV_GITREPO=${LSST_SCIPIPECENV_GITREPO:- https:// github.com/ lsst/ scipipe_conda_env.git}
25
-
25
+ LSST_RUBIN_ENV_NAME= " rubin-env "
26
26
set -e
27
27
28
28
@@ -34,13 +34,14 @@ usage() {
34
34
# note that heredocs are prefixed with tab chars
35
35
fail " $( cat << -EOF
36
36
37
- Usage: $0 [-h] [-r REF|-v VERSION|-x TAG]
37
+ Usage: $0 [-h] [-r REF|-v VERSION|-x TAG] [-e ENV]
38
38
39
39
Specific options:
40
40
-v VERSION a specific version of rubin-env conda package.
41
41
By default will use the version specified in etc/settings.cfg.sh
42
42
-r REF git reference (SHA1) in scipipe_conda_env repository (backward compatibility)
43
43
-x TAG eups tag to select the exact environment for that tag
44
+ -e ENV install a specific environment, like rubin-env-developer
44
45
-h show this message
45
46
46
47
EOF
@@ -54,11 +55,14 @@ parse_args() {
54
55
55
56
# We are intentionally not using gnu `getopt` due to portability concerns.
56
57
# Sadly, this means no long options without a massive amount of boilerplate.
57
- while getopts " hr:v:x:" opt; do
58
+ while getopts " hr:v:x:e: " opt; do
58
59
case " $opt " in
59
60
h)
60
61
usage
61
62
;;
63
+ e)
64
+ LSST_RUBIN_ENV_NAME=${OPTARG}
65
+ ;;
62
66
v)
63
67
[[ -n $TAG ]] && usage " Cannot specify both -v and -x"
64
68
[[ -n $ENVREF ]] && usage " Cannot specify both -v and -r"
@@ -225,7 +229,7 @@ main() {
225
229
if [[ -n $TAG ]]; then
226
230
ARGS+=(" --file" " ${TAG} .env" )
227
231
else
228
- ARGS+=(" rubin-env =${RUBIN_ENV_VERSION} " )
232
+ ARGS+=(" ${LSST_RUBIN_ENV_NAME} =${RUBIN_ENV_VERSION} " )
229
233
fi
230
234
echo " mamba" " ${ARGS[@]} "
231
235
mamba " ${ARGS[@]} "
0 commit comments