forked from spacetelescope/crds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crds_setup_env
executable file
·47 lines (39 loc) · 981 Bytes
/
crds_setup_env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /bin/bash
export OS=${1:-`uname -s`}
export SHELL=${2:-bash}
export WHERE=${3:-"$HOME/miniconda3"}
case $OS in
Darwin)
export CONDA_INSTALLER=Miniconda3-latest-MacOSX-x86_64.sh
;;
Linux)
export CONDA_INSTALLER=Miniconda3-latest-Linux-x86_64.sh
;;
*)
echo "usage: $0 [Darwin|Linux] [bash|csh|zsh] [path_to_install_dir]"
exit -1
;;
esac
case $SHELL in
bash)
;;
csh)
;;
zsh)
;;
*)
echo "Invalid SHELL selected = $SHELL"
exit -1
;;
esac
echo "Installing OS=$OS SHELL=$SHELL WHERE=$WHERE"
rm -rf $WHERE
rm -f ${CONDA_INSTALLER}*
wget --no-check-certificate https://repo.anaconda.com/miniconda/${CONDA_INSTALLER}
bash ${CONDA_INSTALLER} -b -p $WHERE
rm -f ${CONDA_INSTALLER}
source $WHERE/etc/profile.d/conda.sh
conda update --yes -n base -c defaults conda
conda init $SHELL
conda create --yes -n crds-env python=3.7 # conda
conda activate crds-env