-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·35 lines (31 loc) · 925 Bytes
/
install.sh
File metadata and controls
executable file
·35 lines (31 loc) · 925 Bytes
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
#!/bin/bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd $SCRIPT_DIR
if [[ ! ${1+defined} ]];then
echo "Supply a default config, options: $(ls configs | tr '\n' ' ' | sed 's/.yaml//g')"
exit 1
fi
if [[ ! -f "configs/$1.yaml" ]];then
echo "Specified config does not exists, options: $(ls configs | tr '\n' ' ' | sed 's/.yaml//g')"
exit 1
fi
if ! which python3 &> /dev/null;then
echo "Could not find python3"
exit 1
fi
if which pip3 &> /dev/null;then
PIP=pip3
elif which pip &> /dev/null;then
PIP=pip
else
echo "Could not find pip3 or pip"
exit 1
fi
mkdir -p default_config
ln -sf ../configs/$1.yaml default_config/config.yaml
echo "Using python3: $(which python3)"
unset PYTHONUSERBASE
export PYTHONUSERBASE=PyDeps
echo "export PY_EXE=$(which python3)" > frontends/inst_vars.sh
echo "Installing pyyaml with $PIP"
$PIP install --user pyyaml