#! /bin/bash
#
# Wrapper script for running debuild to build this package.

set -e

f=`cd .. && ls sysconftool-0.22.tar* | sed -n 1p`
rm -rf deb
mkdir deb
cp ../$f deb/`echo $f | sed 's/-/_/;s/.tar./.orig.tar./'`
cd deb
tar xf *
cd sysconftool-0.22
cp -pr packaging/debian .
debuild "$@"
cd ..
rm -rf sysconftool-0.22
echo "Built packages in the deb subdirectory."
