Split GetStatus JVM command.
[barry/progweb.git] / maintainer / deb-src-create.sh
blob1668f93e113bad86fa23ce2472ce69c25d259eda
1 #!/bin/sh
3 if [ -z "$1" -o -z "$2" ] ; then
4 echo
5 echo "Usage: ./deb-src-create.sh MAJOR MINOR"
6 echo
7 echo "MAJOR is the desired major version number"
8 echo "MINOR is the desired minor version number"
9 echo
10 echo "This script expects a barry-\$MAJOR.\$MINOR directory"
11 echo "to exist in the directory it is run in."
12 echo
13 exit 1
16 DIRNAME="barry-$1.$2"
17 MAJOR="$1"
18 MINOR="$2"
20 set -e
22 # Create Debian source package, by creating a patched and "orig" set of trees.
24 # The following dance is to keep the .orig.tar.gz containing barry-0.12/
25 # as the directory, and not something like barry-0.12.orig/ which gets
26 # corrected by Debian tools. If there is a better way, please send a patch.
27 cp -a $DIRNAME $DIRNAME.patched
28 rm -rf $DIRNAME/debian
29 tar -cf - $DIRNAME | gzip -9c > barry_$MAJOR.$MINOR.orig.tar.gz
30 rm -rf $DIRNAME
31 mv $DIRNAME.patched $DIRNAME
32 dpkg-source -b $DIRNAME barry_$MAJOR.$MINOR.orig.tar.gz