Skip to content

Commit 970d08c

Browse files
authored
Merge pull request #41 from mekanix/feature/syspkg
Add support for SYSPKG
2 parents 162b7b4 + a5325af commit 970d08c

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

bin/common.sh

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@ export PROJECT_ROOT="${BIN_DIR}/.."
77
export VIRTUALENV=${VIRTUALENV:="${app_name}back"}
88
export FLASK_ENV=${FLASK_ENV:="production"}
99
export PY_VERSION=${PY_VERSION:="3.7"}
10+
export SYSPKG=${SYSPKG:="no"}
1011

1112

1213
setup() {
13-
update=${1}
14-
if [ ! -d ${HOME}/.virtualenvs/${VIRTUALENV} ]; then
15-
python${PY_VERSION} -m venv "${HOME}/.virtualenvs/${VIRTUALENV}"
16-
fi
17-
. ${HOME}/.virtualenvs/${VIRTUALENV}/bin/activate
14+
if [ "${SYSPKG}" = "no" ]; then
15+
update=${1}
16+
if [ ! -d ${HOME}/.virtualenvs/${VIRTUALENV} ]; then
17+
python${PY_VERSION} -m venv "${HOME}/.virtualenvs/${VIRTUALENV}"
18+
fi
19+
. ${HOME}/.virtualenvs/${VIRTUALENV}/bin/activate
1820

19-
cd ${PROJECT_ROOT}
20-
if [ "${update}" != "no" ]; then
21-
pip install -U pip
22-
pip install -U wheel
23-
pip install -e .
21+
cd ${PROJECT_ROOT}
22+
if [ "${update}" != "no" ]; then
23+
pip install -U pip
24+
pip install -U wheel
25+
pip install -e .
26+
fi
2427
fi
2528
if [ -e "${BIN_DIR}/../migrations/main/001_initial.py" ]; then
2629
flask migration run

bin/devel.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
BIN_DIR=`dirname $0`
55
export FLASK_PORT=${FLASK_PORT:=5000}
66
export FLASK_ENV="development"
7-
export OFFLINE=${OFFLINE:=no}
7+
export OFFLINE=${OFFLINE:="no"}
8+
export SYSPKG=${SYSPKG:="no"}
89

910

1011
. ${BIN_DIR}/common.sh
1112
setup no
1213

13-
14-
if [ "${OFFLINE}" != "yes" ]; then
15-
pip install -U -r requirements_dev.txt
14+
if [ "${SYSPKG}" = "no" ]; then
15+
if [ "${OFFLINE}" != "yes" ]; then
16+
pip install -U -r requirements_dev.txt
17+
fi
1618
fi
1719

1820

bin/init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33

4-
export OFFLINE=${OFFLINE:=no}
4+
export OFFLINE=${OFFLINE:="no"}
55
BIN_DIR=`dirname $0`
66
. ${BIN_DIR}/common.sh
77

File renamed without changes.

0 commit comments

Comments
 (0)