canaille-globuzma/demo/run.sh

19 lines
493 B
Bash
Executable file

#!/bin/bash
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
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
env "PWD=$DIR" $DIR/env/bin/honcho start