summaryrefslogtreecommitdiffstats
path: root/mktarball.in
diff options
context:
space:
mode:
authorBalbir Singh <balbir@linux.vnet.ibm.com>2008-05-24 11:23:08 +0000
committerBalbir Singh <balbir@linux.vnet.ibm.com>2008-05-24 11:23:08 +0000
commit9190c1241a381f610d52eb6413f793cfc8435ef2 (patch)
tree8ce4c7eaf494d353a4f626759e622d85a292e3fd /mktarball.in
parentd525ed7a91bc0255036902e02a02a575ca7e8b7f (diff)
downloadlibcg-9190c1241a381f610d52eb6413f793cfc8435ef2.tar.gz
libcg-9190c1241a381f610d52eb6413f793cfc8435ef2.tar.xz
libcg-9190c1241a381f610d52eb6413f793cfc8435ef2.zip
Merged with balbir, all part of build automation
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@52 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'mktarball.in')
-rwxr-xr-xmktarball.in36
1 files changed, 36 insertions, 0 deletions
diff --git a/mktarball.in b/mktarball.in
new file mode 100755
index 0000000..eeabe19
--- /dev/null
+++ b/mktarball.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+srcd=$PWD
+package_version=@PACKAGE_VERSION@
+case $# in
+ 0)
+ ;;
+ *) echo "usage is $0"
+ exit 1
+ ;;
+esac
+
+svn info 2>&1 > /dev/null
+
+if [ $? -eq 1 ]
+then
+ issvn=0
+else
+ issvn=1
+fi
+
+if [[ $issvn -eq 1 ]]
+then
+ svn export --force http://libcg.svn.sf.net/svnroot/libcg/tags/v$package_version /tmp/cgroup-$package_version
+ if [[ $? -ne 0 ]]
+ then
+ echo "Tag v$package_version missing"
+ fi
+else
+ cp -a . /tmp/cgroup-$package_version
+fi
+
+pushd /tmp 2>&1 > /dev/null
+tar jcf $srcd/cgroup-$package_version.tar.bz2 cgroup-$package_version
+popd 2>&1 > /dev/null
+