aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/auto-build/auto-build-common26
-rwxr-xr-xscripts/auto-build/pd-extended-auto-builder.sh2
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