summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2016-02-04 09:01:11 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2016-02-04 09:02:24 (GMT)
commit20333d5b8dc0f97b60415f0daf3c53a573e0ff8f (patch)
tree1d082241e389d71ed3d8656017589ed714b9f6f4 /Swift/Packaging/Source/package.sh
parent1b9ccc1fef6104eaf951153ddccdc6bb15899e9a (diff)
downloadswift-20333d5b8dc0f97b60415f0daf3c53a573e0ff8f.zip
swift-20333d5b8dc0f97b60415f0daf3c53a573e0ff8f.tar.bz2
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
Diffstat (limited to 'Swift/Packaging/Source/package.sh')
-rwxr-xr-xSwift/Packaging/Source/package.sh12
1 files changed, 11 insertions, 1 deletions
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
@@ -1,32 +1,42 @@
#!/bin/sh
## For a Swiften-only tarball, try
## EXCLUDE_FOLDERS="Swift Sluift Swiftob Limber Slimber" ./package.sh
export PYTHONPATH=../../../BuildTools/SCons
VERSION=`../../../BuildTools/GetBuildVersion.py swift`
DIRNAME=swift-$VERSION
if [ -z "$VERSION" ]; then
echo "Unable to determine version"
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-*
echo "Checking out a fresh copy ..."
rm -rf $DIRNAME
git clone ../../../.git $DIRNAME
echo "$VERSION" > $DIRNAME/VERSION.swift
rm -rf $DIRNAME/.git
echo "Excluding folders based on environment variable EXCLUDE_FOLDERS='$EXCLUDE_FOLDERS'"
for FOLDER in $EXCLUDE_FOLDERS;
do
echo "Excluding $FOLDER"
rm -rf $DIRNAME/$FOLDER
done
echo "Creating tarball ..."
-tar czf $DIRNAME.tar.gz $DIRNAME
+$TAR -czf $DIRNAME.tar.gz --owner=swift --group=swift $DIRNAME