aboutsummaryrefslogtreecommitdiff
path: root/scripts/auto-build/auto-build-common
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-09-25 03:17:46 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-09-25 03:17:46 +0000
commitcd8213c1913ba1a1dfa5ec59672db14d775f6ab5 (patch)
treee4a400e10f96f30442b15a819e7d6f8ba62be6f6 /scripts/auto-build/auto-build-common
parentd370ab45bce99290ffeaa7d8541875f1d857841e (diff)
generate a source tarball before running the build
svn path=/trunk/; revision=16278
Diffstat (limited to 'scripts/auto-build/auto-build-common')
-rw-r--r--scripts/auto-build/auto-build-common26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/auto-build/auto-build-common b/scripts/auto-build/auto-build-common
index 3ae16871..ff6b0422 100644
--- a/scripts/auto-build/auto-build-common
+++ b/scripts/auto-build/auto-build-common
@@ -138,3 +138,29 @@ clean_and_update_folder()
echo "no cleaning done, unknown SCM"
fi
}
+
+get_pd_version()
+{
+ PD_MAJOR_VERSION=$(grep PD_MAJOR_VERSION $1/pd/src/m_pd.h | \
+ sed 's|^.define *PD_MAJOR_VERSION *\([0-9]*\).*|\1|' )
+ PD_MINOR_VERSION=$(grep PD_MINOR_VERSION $1/pd/src/m_pd.h | \
+ sed 's|^.define *PD_MINOR_VERSION *\([0-9]*\).*|\1|' )
+ PD_BUGFIX_VERSION=$(grep PD_BUGFIX_VERSION $1/pd/src/m_pd.h | \
+ sed 's|^.define *PD_BUGFIX_VERSION *\([0-9]*\).*|\1|' )
+ PD_TEST_VERSION=$(grep PD_TEST_VERSION $1/pd/src/m_pd.h | \
+ sed 's|^.define *PD_TEST_VERSION *"\(.*\)".*|\1|' | \
+ sed 's|extended-||')
+ if [ -z $PD_TEST_VERSION ]; then
+ echo $PD_MAJOR_VERSION.$PD_MINOR_VERSION.$PD_BUGFIX_VERSION
+ else
+ echo $PD_MAJOR_VERSION.$PD_MINOR_VERSION.$PD_BUGFIX_VERSION~$PD_TEST_VERSION
+ fi
+}
+
+make_source_tarball()
+{
+ version=$(get_pd_version $1)
+ tarball=$1/../pd-extended_$version.tar.bz2
+ tar --exclude-vcs --directory $1/.. -cjpf $tarball pd-extended
+ mv $tarball $2
+}