diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-09-25 03:17:46 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2012-09-25 03:17:46 +0000 |
commit | cd8213c1913ba1a1dfa5ec59672db14d775f6ab5 (patch) | |
tree | e4a400e10f96f30442b15a819e7d6f8ba62be6f6 /scripts/auto-build | |
parent | d370ab45bce99290ffeaa7d8541875f1d857841e (diff) |
generate a source tarball before running the build
svn path=/trunk/; revision=16278
Diffstat (limited to 'scripts/auto-build')
-rw-r--r-- | scripts/auto-build/auto-build-common | 26 | ||||
-rwxr-xr-x | scripts/auto-build/pd-extended-auto-builder.sh | 2 |
2 files changed, 28 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 +} 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 |