summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-02 19:44:09 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-02 19:44:28 (GMT)
commit60a1dfe187dbe11e61e7f867e4c04454a9d3a5e6 (patch)
tree91cf664a99fb0bf3064f79fc81b074acfdd33c4a /Swift/Packaging
parent8a2f97f752c146a0e35b3640d57e517319fd924e (diff)
downloadswift-contrib-60a1dfe187dbe11e61e7f867e4c04454a9d3a5e6.zip
swift-contrib-60a1dfe187dbe11e61e7f867e4c04454a9d3a5e6.tar.bz2
Make package script more foolproof.
Diffstat (limited to 'Swift/Packaging')
-rwxr-xr-xSwift/Packaging/Debian/package.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/Swift/Packaging/Debian/package.sh b/Swift/Packaging/Debian/package.sh
index cc657b2..5e93ee9 100755
--- a/Swift/Packaging/Debian/package.sh
+++ b/Swift/Packaging/Debian/package.sh
@@ -4,10 +4,20 @@ 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 packages ..."
+rm swift_*
+
+echo "Checking out a fresh copy ..."
rm -rf $DIRNAME
git clone ../../../.git $DIRNAME
ln -s Swift/Packaging/Debian/debian $DIRNAME/debian
+echo "Building ..."
cd $DIRNAME
echo $PWD
dpkg-buildpackage -rfakeroot -i -I