forked from arnehilmann/netkraken
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-devenv
executable file
·42 lines (35 loc) · 951 Bytes
/
init-devenv
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
#!/bin/bash
set -e -E -u
VERSION=$(lsb_release -is 2> /dev/null || uname)
echo "setting up development environment for $VERSION"
VENV=venv
echo "virtualenv dir is $VENV"
case $VERSION in
ManjaroLinux)
virtualenv --version > /dev/null 2>&1 || sudo pacman -S python-virtualenv
;;
Ubuntu)
virtualenv --version > /dev/null 2>&1 || sudo apt-get install virtualenv
;;
Darwin)
virtualenv --version > /dev/null 2>&1 || brew install pyenv-virtualenv
;;
Linux)
virtualenv --version > /dev/null 2>&1 || sudo yum install python-virtualenv
;;
*)
echo "unkonwn system $VERSION"
exit 1
;;
esac
rm -rf $VENV
virtualenv $VENV
set +u
source $VENV/bin/activate
set -u
pip install pybuilder
pyb install_dependencies
(cd $VENV/bin; ln -sf ../../src/main/scripts/* .)
(cd $VENV/lib/python*/site-packages; ln -sf ../../../../src/main/python/* .)
pyb -X
echo "done."