File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 2323
2424
2525usage (){
26- echo " Usage: install.sh [-h]"
26+ echo " Usage: install.sh [-h] [-y] "
2727 echo
2828 echo " -h : show this help"
29+ echo " -y : Adds '-y' option to '$CONDA env [create|remove|...]' command arguments."
2930 exit 1
3031}
3132
32- while getopts " h" OPTNAME ; do
33+ CONDA_OPTIONS=" "
34+ while getopts " yh" OPTNAME ; do
3335 case " ${OPTNAME} " in
3436 h)
3537 usage
3638 ;;
39+ y)
40+ CONDA_OPTIONS=" -y"
41+ shift 1
42+ ;;
3743 :)
3844 # If expected argument omitted:
3945 echo " Error: -${OPTARG} requires an argument."
5056if $CONDA env list | grep -q mellea
5157then
5258 echo " An existing mellea environment was found."
53- $CONDA env remove -n mellea
59+ $CONDA env remove $CONDA_OPTIONS -n mellea
5460fi
5561
5662
5763# note:
5864# this is a portable way (works in linux and osx) to get the directory of this script.
5965# readlink -ef may not work on osx.
6066SCRIPT_DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
61- $CONDA env create -f $SCRIPT_DIR /environment.yml
67+ $CONDA env create $CONDA_OPTIONS -f $SCRIPT_DIR /environment.yml
6268
6369$CONDA run -n mellea uv pip install -e .[all] --group dev --group notebook --group docs
6470
You can’t perform that action at this time.
0 commit comments