#!/bin/bash
#
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.
#

# cd to the root directory
ABOUT_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$ABOUT_ROOT_DIR"

# where we create a virtualenv
VIRTUALENV_DIR=venv

CONFIGURED_PYTHON=$ABOUT_ROOT_DIR/$VIRTUALENV_DIR/bin/python

if [ ! -f "$CONFIGURED_PYTHON" ]; then
    echo "* Configuring AboutCode ..."
    source $ABOUT_ROOT_DIR/configure
fi


source $ABOUT_ROOT_DIR/$VIRTUALENV_DIR/bin/activate

$ABOUT_ROOT_DIR/$VIRTUALENV_DIR/bin/about "$@"
