From cd3017c8730ce66539d539890d72434cf644ab80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Tue, 5 Oct 2010 16:18:34 +0200
Subject: Added tarball packaging script.

Resolves: #517

diff --git a/Swift/Packaging/Source/.gitignore b/Swift/Packaging/Source/.gitignore
new file mode 100644
index 0000000..b808f79
--- /dev/null
+++ b/Swift/Packaging/Source/.gitignore
@@ -0,0 +1 @@
+swift-*
diff --git a/Swift/Packaging/Source/package.sh b/Swift/Packaging/Source/package.sh
new file mode 100755
index 0000000..ef1e9a3
--- /dev/null
+++ b/Swift/Packaging/Source/package.sh
@@ -0,0 +1,22 @@
+#!/bin/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
+
+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 "Creating tarball ..."
+tar czf $DIRNAME.tar.gz $DIRNAME
-- 
cgit v0.10.2-6-g49f6