Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ export PROJECT_ROOT="${BIN_DIR}/.."
export VIRTUALENV=${VIRTUALENV:="${app_name}back"}
export FLASK_ENV=${FLASK_ENV:="production"}
export PY_VERSION=${PY_VERSION:="3.7"}
export SYSPKG=${SYSPKG:="no"}


setup() {
update=${1}
if [ ! -d ${HOME}/.virtualenvs/${VIRTUALENV} ]; then
python${PY_VERSION} -m venv "${HOME}/.virtualenvs/${VIRTUALENV}"
fi
. ${HOME}/.virtualenvs/${VIRTUALENV}/bin/activate
if [ "${SYSPKG}" = "no" ]; then
update=${1}
if [ ! -d ${HOME}/.virtualenvs/${VIRTUALENV} ]; then
python${PY_VERSION} -m venv "${HOME}/.virtualenvs/${VIRTUALENV}"
fi
. ${HOME}/.virtualenvs/${VIRTUALENV}/bin/activate

cd ${PROJECT_ROOT}
if [ "${update}" != "no" ]; then
pip install -U pip
pip install -U wheel
pip install -e .
cd ${PROJECT_ROOT}
if [ "${update}" != "no" ]; then
pip install -U pip
pip install -U wheel
pip install -e .
fi
fi
if [ -e "${BIN_DIR}/../migrations/main/001_initial.py" ]; then
flask migration run
Expand Down
10 changes: 6 additions & 4 deletions bin/devel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
BIN_DIR=`dirname $0`
export FLASK_PORT=${FLASK_PORT:=5000}
export FLASK_ENV="development"
export OFFLINE=${OFFLINE:=no}
export OFFLINE=${OFFLINE:="no"}
export SYSPKG=${SYSPKG:="no"}


. ${BIN_DIR}/common.sh
setup no


if [ "${OFFLINE}" != "yes" ]; then
pip install -U -r requirements_dev.txt
if [ "${SYSPKG}" = "no" ]; then
if [ "${OFFLINE}" != "yes" ]; then
pip install -U -r requirements_dev.txt
fi
fi


Expand Down
2 changes: 1 addition & 1 deletion bin/init.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh


export OFFLINE=${OFFLINE:=no}
export OFFLINE=${OFFLINE:="no"}
BIN_DIR=`dirname $0`
. ${BIN_DIR}/common.sh

Expand Down
File renamed without changes.