summaryrefslogtreecommitdiffstats
path: root/contrib/jenkins_common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/jenkins_common.sh')
-rw-r--r--contrib/jenkins_common.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
index e52a96a9..6cfa3347 100644
--- a/contrib/jenkins_common.sh
+++ b/contrib/jenkins_common.sh
@@ -4,4 +4,20 @@ set -ex
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
-autoreconf --install --force
+prep_build() {
+ _src_dir="$1"
+ _build_dir="$2"
+
+ cd "$_src_dir"
+
+ # a failed 'make distcheck' may leave files without write permissions
+ chmod -R a+w .
+ git clean -dxf
+ # make absolutely sure no src files have modifications
+ git checkout -f HEAD
+
+ autoreconf --install --force
+
+ mkdir -p "$_build_dir"
+ cd "$_build_dir"
+}