#!/bin/sh -

set -e
set -v

if [ "x$CCM_SCRIPTS_HOME" = "x" ]; then
    echo "Please set CCM_SCRIPTS_HOME environment variable"
fi

rm -rf build MANIFEST MANIFEST.SKIP

if [ "x$AUTO_BUILD_COUNTER" != "x" ]; then
  CCM_BUILD_COUNTER=$AUTO_BUILD_COUNTER
  export CCM_BUILD_COUNTER
fi

exec $CCM_SCRIPTS_HOME/bin/build.sh
