From cd8213c1913ba1a1dfa5ec59672db14d775f6ab5 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 25 Sep 2012 03:17:46 +0000 Subject: generate a source tarball before running the build svn path=/trunk/; revision=16278 --- scripts/auto-build/auto-build-common | 26 ++++++++++++++++++++++++++ scripts/auto-build/pd-extended-auto-builder.sh | 2 ++ 2 files changed, 28 insertions(+) (limited to 'scripts/auto-build') 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 +} diff --git a/scripts/auto-build/pd-extended-auto-builder.sh b/scripts/auto-build/pd-extended-auto-builder.sh index e9bddea5..12a3ba47 100755 --- a/scripts/auto-build/pd-extended-auto-builder.sh +++ b/scripts/auto-build/pd-extended-auto-builder.sh @@ -57,6 +57,8 @@ set echo "--- mounts ----------------------------------------" mount print_ip_address + +make_source_tarball "${auto_build_root_dir}" "${auto_build_root_dir}/packages/$BUILD_DIR" make install && make package -- cgit v1.2.1