From 20333d5b8dc0f97b60415f0daf3c53a573e0ff8f Mon Sep 17 00:00:00 2001 From: Edwin Mons Date: Thu, 4 Feb 2016 10:01:11 +0100 Subject: Anonymise owner and group in source tar package Requires GNU tar, which isn't installed by default on OS X. Test-Information: Tested on Debian 8 and OS X 10.11 with Homebrew gnu-tar. Change-Id: I2165654489bd01223f1366a71f62fd7fe4187e11 diff --git a/Swift/Packaging/Source/package.sh b/Swift/Packaging/Source/package.sh index 4d229a6..f54170b 100755 --- a/Swift/Packaging/Source/package.sh +++ b/Swift/Packaging/Source/package.sh @@ -12,6 +12,16 @@ if [ -z "$VERSION" ]; then exit -1 fi +if [ "`uname -s`" = "Darwin" ]; then + TAR=gtar + if ! $TAR --version >/dev/null 2>&1; then + echo "Unable to find GNU tar (coulnd't find $TAR)" + exit 1 + fi +else + TAR=tar +fi + echo "Cleaning up old sources ..." rm -rf swift-* @@ -29,4 +39,4 @@ do done echo "Creating tarball ..." -tar czf $DIRNAME.tar.gz $DIRNAME +$TAR -czf $DIRNAME.tar.gz --owner=swift --group=swift $DIRNAME -- cgit v0.10.2-6-g49f6