Skip to content

Instantly share code, notes, and snippets.

@kacf
Created October 28, 2015 13:20
Show Gist options
  • Save kacf/d0831800f8ccef20bed9 to your computer and use it in GitHub Desktop.
Save kacf/d0831800f8ccef20bed9 to your computer and use it in GitHub Desktop.
Moving tarball job
diff --git a/build-scripts/bootstrap-tarballs b/build-scripts/bootstrap-tarballs
index 70321d2..94cf2fb 100755
--- a/build-scripts/bootstrap-tarballs
+++ b/build-scripts/bootstrap-tarballs
@@ -27,12 +27,3 @@ cd $BASEDIR/output/tarballs
sha256sum *.tar.gz > sha256sums.txt
CKSUM=`sum sha256sums.txt | cut -d ' ' -f 1`
mv sha256sums.txt sha256sums.$CKSUM.txt
-
-# DELETE the git-checked-out directories, they are tainted with
-# ./configure artifacts anyway. The tarballs are unpacked and symlinked
-# into place, during the next building stage in each of the various
-# buildslaves. That way unpacking of tarballs on all platforms is
-# verified.
-
-cd "$BASEDIR"
-rm -rf "$BASEDIR/core/" "$BASEDIR/masterfiles/"
diff --git a/build-scripts/unpack-tarballs b/build-scripts/unpack-tarballs
index a7fe866..67b15f5 100755
--- a/build-scripts/unpack-tarballs
+++ b/build-scripts/unpack-tarballs
@@ -9,8 +9,13 @@ SOURCE_TARBALL="$BASEDIR/output/tarballs/cfengine-3.*.tar.gz"
MASTERFILES_TARBALL="$BASEDIR/output/tarballs/cfengine-masterfiles*.tar.gz"
cd $BASEDIR
+# DELETE the git-checked-out directories, they are tainted with
+# ./configure artifacts anyway. The tarballs are unpacked and symlinked
+# into place. That way unpacking of tarballs on all platforms is
+# verified.
+
echo "Ensuring that the git-checked-out directories core/ and masterfiles/ are
-[ -e core -o -e masterfiles ] && exit 1 || true
+rm -rf "$BASEDIR/core/" "$BASEDIR/masterfiles/"
# NATIVE TAR is being used on purpose, and *not* GNU TAR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment