canaille-globuzma/demo/run.sh

20 lines
493 B
Bash
Raw Normal View History

#!/bin/bash
2020-11-13 10:15:17 +00:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if ! type python > /dev/null 2>&1; then
echo "Cannot start the LDAP server. Please install python on your system."
return -1
fi
2020-11-13 10:15:17 +00:00
if ! test -d "$DIR/env"; then
{
virtualenv "$DIR/env" &&
$DIR/env/bin/pip install --editable "$DIR/.." &&
$DIR/env/bin/pip install honcho requests slapd
} || rm --recursive --force "$DIR/env"
fi
2020-11-13 10:15:17 +00:00
env "PWD=$DIR" $DIR/env/bin/honcho start