From 065c8a9ac5c5c59571d9b2813f417cfb9225a7e1 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Wed, 23 Mar 2011 14:17:32 +0000 Subject: [PATCH] Added prepare step. Introduced a prepare step for the sources which can be specified by defining the src_prepare function. e.g. to use patches. The src_prepare function will be called in the $SRCDIR. example: src_prepare() { patch -p1 < ${SRC_POOL}/my_src.patch } --- functions.sh | 11 +++++++++++ sit | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/functions.sh b/functions.sh index e6c85d4..95fae85 100644 --- a/functions.sh +++ b/functions.sh @@ -47,6 +47,17 @@ sit_unpack() { src_unpack } + +src_prepare() { + /bin/true +} +sit_prepare() { + sit_info "Preparing sources" + cd ${SRCDIR} + src_prepare || sit_fail "Preparing sources failed" +} + + src_configure() { ${SRCDIR}/configure --prefix=$PREFIX $CONFIGURE_OPTS if [ ! -z $LOGDIR ] ; then diff --git a/sit b/sit index d40a8f4..4eae95a 100755 --- a/sit +++ b/sit @@ -142,7 +142,8 @@ mkdir -p ${WORKDIR} mkdir -p ${BUILDDIR} mkdir -p ${LOGDIR} -sit_unpack; 2>&1 | tee "$LOGDIR/unpack.log"; ( exit ${PIPESTATUS} ) +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} ) sit_build 2>&1 | tee "$LOGDIR/make.log"; ( exit ${PIPESTATUS} ) sit_pretest 2>&1 | tee "$LOGDIR/pretest.log"; ( exit ${PIPESTATUS} )