https://github.com/EasyCrypt/easycrypt
Tip revision: a79f9aeb6de046ca12210d26317fab59c175d0dd authored by Pierre-Yves Strub on 08 July 2014, 09:43:21 UTC
Fix bug w.r.t. _tools presence detection.
Fix bug w.r.t. _tools presence detection.
Tip revision: a79f9ae
ec-run-webui
#! /bin/bash
# --------------------------------------------------------------------
set -e
# --------------------------------------------------------------------
: ${DEST="${PWD}/_tools/webui"} # MUST BE ABSOLUTE
# --------------------------------------------------------------------
if [ ! -d "${DEST}" ]; then
echo "Install webui first (make webui-env)" >&2
exit 1
fi
# --------------------------------------------------------------------
MYDIR="$(cd $(dirname $0) && pwd)"
source "${DEST}/webui-env/bin/activate"
export PATH="${MYDIR}/..:${PATH}"; hash -r
function psstop {
( cd "${MYDIR}/../webui";
pserve --stop --pid-file="$1.pid" --log-file="$1.log" "$2".ini || true )
}
function psstart {
( cd "${MYDIR}/../webui";
pserve --stop --pid-file="$1.pid" --log-file="$1.log" "$2".ini || true;
pserve --daemon --pid-file="$1.pid" --log-file="$1.log" "$2".ini )
}
case "$1" in
"start")
psstart backend backend
psstart econline development
;;
"stop")
psstop backend backend
psstop econline development
;;
*)
echo "unknown command: $1"
;;
esac
exit 0