#!/bin/bash

if [ "$TRAVIS" = "true" ] ; then
    cd docs
    MAKE="make"
else
    # Run in docker
    cd `dirname $0`/..
    docker build -t xd-docker-docs -f docs/Dockerfile .
    MAKE="docker run -v $PWD:/src -w /src/docs xd-docker-docs make"
fi

# Default make arguments
if [ $# -eq 0 ] ; then
    MAKE+=" html"
fi

$MAKE $*

#!/bin/bash

if [ "$TRAVIS" = "true" ] ; then
    cd docs
    MAKE="make"
else
    # Run in docker
    cd `dirname $0`/..
    docker build -t xd-docker-docs -f docs/Dockerfile .
    MAKE="docker run --rm -v $PWD:/src -w /src/docs xd-docker-docs make"
fi

# Default make arguments
if [ $# -eq 0 ] ; then
    MAKE+=" html"
fi

$MAKE $*

Remove xd-docker-docs container after use
Remove xd-docker-docs container after use

Signed-off-by: Esben Haabendal <da90c138e4a9573086862393cde34fa33d74f6e5@haabendal.dk>
