diff --git a/functions.sh b/functions.sh index 95fae85..1eb5388 100644 --- a/functions.sh +++ b/functions.sh @@ -125,4 +125,22 @@ sit_setperms() { src_setperms || sit_fail "Could not set permissions" } - +sit_sitinfo() { + local SIT_VERSION="unknown" + if [ "$(svnversion $SIT_PATH)" != "exported" ] ; then + sit_info "SVN" + SIT_VERSION="svn-r$(svnversion $SIT_PATH)" + elif [ git svn find-rev r1 ] ; then + sit_info "GIT" + SIT_VERSION="$(cd $SIT_PATH; git svn find-rev HEAD) (git svn)"; + else + SIT_VERSION="unknown" + fi + echo "Invocation: $(ps --pid $$ -o cmd | tail -n 1)" + echo "Started: $(date)" + echo "Version: $SIT_VERSION" + echo "Environment:" + echo "------------------------------------------------------------------------------" + env + echo "------------------------------------------------------------------------------" +} diff --git a/sit b/sit index 42463ac..808fb3f 100755 --- a/sit +++ b/sit @@ -166,6 +166,7 @@ mkdir -p ${WORKDIR} mkdir -p ${BUILDDIR} mkdir -p ${LOGDIR} +sit_sitinfo >> "$LOGDIR/sit_cmd.log" sit_unpack 2>&1 | tee "$LOGDIR/unpack.log"; ( exit ${PIPESTATUS} ) sit_prepare 2>&1 | tee "$LOGDIR/prepare.log"; ( exit ${PIPESTATUS} ) sit_configure 2>&1 | tee "$LOGDIR/configure.log"; ( exit ${PIPESTATUS} )