diff --git a/build-debs b/build-debs index cfdac36cf..4c6e626f3 100755 --- a/build-debs +++ b/build-debs @@ -1,13 +1,27 @@ -#!/bin/sh +#!/bin/bash # Accepts directories to build packages from on the commandline, but defaults -# to building: perl-xCAT-2.0 and xCAT-client-2.0 +# to building: perl-xCAT and xCAT-client + +major="2.1" +lintian="" # TODO: lintian fails currently +#lintian="--svn-lintian" + +if [ "$1" = "-s" ]; then + shift + snap=true + date="$( date +'%F' )" + version="$major-snapshot-$( date +'%Y%m%d' )" +fi packages="${@:-perl-xCAT xCAT-client}" for pkg in $packages; do mkdir -p debs/$pkg - echo Building .dsc source package for $pkg + echo "*** Building Debian package for $pkg." cd $pkg - svn-buildpackage --svn-ignore --svn-lintian --svn-move-to=../debs/$pkg + if $snap; then + debchange --distribution unstable --newversion $version "snapshot of $pkg from $date" + fi + svn-buildpackage --svn-ignore $lintian --svn-move-to=../debs/$pkg cd - done