-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
32 lines (25 loc) · 916 Bytes
/
bootstrap.sh
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
#!/usr/bin/env bash
set -e
git clone https://github.com/matpow2/cuwo.git .
curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
# create run_pyenv.sh
echo '#!/usr/bin/env bash' > run_pyenv.sh
echo 'export PYENV_ROOT=${HOME}/.pyenv' >> run_pyenv.sh
echo 'if [ -d "${PYENV_ROOT}" ]; then' >> run_pyenv.sh
echo ' export PATH="${PYENV_ROOT}/bin:${PATH}"' >> run_pyenv.sh
echo ' eval "$(pyenv init -)"' >> run_pyenv.sh
echo 'fi' >> run_pyenv.sh
# create update.sh
echo '#!/usr/bin/env bash' > update.sh
echo 'cd "$(dirname "$0")"' >> update.sh
echo '. ./run_pyenv.sh' >> update.sh
echo 'git pull' >> update.sh
echo 'python setup.py build_ext --inplace --force' >> update.sh
. ./run_pyenv.sh
pyenv update
pyenv install 3.6.1 --skip-existing
pyenv local 3.6.1
pip install -r requirements.txt
python setup.py build_ext --inplace
chmod +x run_server.sh
chmod +x update.sh