#!/usr/bin/env bash

LEGO=${LEGO:-$(dirname $(dirname $(dirname $(readlink -f $0))))}
TOOLS=$LEGO/tools
CODEKEEPER=$TOOLS/codekeeper
SVN=${SVN:-svn}
FILES=$($CODEKEEPER/commit-files)

if [ "$FILES" == "" ]
then
    echo Nothing to commit after package build
else
    cd $LEGO
    $SVN ci -m "codekeeper: package build result" $FILES --trust-server-cert --non-interactive
    cd - > /dev/null
fi
