diff --git a/pdc_web.sh b/pdc_web.sh new file mode 100755 index 0000000..b4fec84 --- /dev/null +++ b/pdc_web.sh @@ -0,0 +1,21 @@ +#/bin/env sh + +# +# Shell wrapper to locally run the flask app as any user: +# +# sudo -u www-data ./pdc_web.sh +# +# Of course, any prerequisites, installation procedure and configuration files may have been fullfilled. +# See README.md and INSTALL.md for more details +# + +SCRIPT_PATH=$(readlink -f $0) +SCRIPT_DIR=$(dirname $SCRIPT_PATH) + +cd $SCRIPT_DIR + +[ ! -f ./venv/bin/activate ] && echo "Create python virtual env ./venv/" && exit +[ ! -f .flaskenv ] && echo "Create .flaskenv file" && exit + +. ./venv/bin/activate +flask run -- libgit2 0.21.2