forked from KeithSSmith/hummingbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·38 lines (30 loc) · 1023 Bytes
/
install
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
#!/bin/bash
cd $(dirname $0)
# Compatibility logic for older Anaconda versions.
if [ "${CONDA_EXE} " == " " ]; then
CONDA_EXE=$((find /opt/conda/bin/conda || find ~/anaconda3/bin/conda || \
find /usr/local/anaconda3/bin/conda || find ~/miniconda3/bin/conda || \
find /root/miniconda/bin/conda || find ~/Anaconda3/Scripts/conda) 2>/dev/null)
fi
if [ "${CONDA_EXE}_" == "_" ]; then
echo "Please install Anaconda w/ Python 3.7+ first"
echo "See: https://www.anaconda.com/distribution/"
exit 1
fi
CONDA_BIN=$(dirname ${CONDA_EXE})
MACOS_ENV=setup/environment.yml
LINUX_ENV=setup/environment-linux.yml
WIN64_ENV=setup/environment-win64.yml
ENV_FILE=$MACOS_ENV
if uname | egrep -qe "Linux"; then
ENV_FILE=$LINUX_ENV
elif uname | egrep -qe "MINGW64"; then
ENV_FILE=$WIN64_ENV
fi
if ${CONDA_EXE} env list | egrep -qe "^hummingbot"; then
${CONDA_EXE} env update -f $ENV_FILE
else
${CONDA_EXE} env create -f $ENV_FILE
fi
source "${CONDA_BIN}/activate" hummingbot
pre-commit install