From e9e1e536ab6dd05cab973a9a1e87bbd5df45cabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 5 Oct 2006 15:57:38 +0000 Subject: [PATCH] More options and flags. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18240 ec53bebd-3082-4978-b11e-865c3cabbd6b --- tools/heimdal-build.sh | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/tools/heimdal-build.sh b/tools/heimdal-build.sh index 748596423..b5983accc 100644 --- a/tools/heimdal-build.sh +++ b/tools/heimdal-build.sh @@ -1,6 +1,6 @@ #!/bin/sh # Fetches, builds and store the result of a heimdal build -# $Id$ +# Version: $Id$ fetchmethod=curl #options are: wget, curl, ftp, afs resultdir= @@ -8,23 +8,31 @@ email=heimdal-build-log@it.su.se baseurl=ftp://ftp.pdc.kth.se/pub/heimdal/src afsdir=/afs/pdc.kth.se/public/ftp/pub/heimdal/src keeptree=no +passhrase= +noemail= # no more use configurabled part below (hopefully) -usage="[--current] [--release version] [--cvs] [--cvs-flags] [--result-directory dir] [--fetch-method method --keep-tree] [--autotools]" +usage="[--current] [--release version] [--cvs SourceRepository] [--cvs-flags] [--result-directory dir] [--fetch-method wget|ftp|curl|cvs] --keep-tree] [--autotools] [--passhrase string] [--no-email]" date=`date +%Y%m%d` -if test "$?" != 0; then +if [ "$?" != 0 ]; then echo "have no sane date, punting" exit 1 fi hostname=`hostname` -if test "$?" != 0; then +if [ "$?" != 0 ]; then echo "have no sane hostname, punting" exit 1 fi +version=`grep "^# Version: " "$0" | cut -f2- -d:` +if [ "X${version}" = X ]; then + echo "Can not figure out what version I am" + exit 1 +fi + dir= hversion= cvsroot= @@ -72,6 +80,18 @@ do keeptree=yes shift ;; + --passhrase) + passhrase="$2" + shift 2 + ;; + --no-email) + noemail="yes" + shift + ;; + --version) + echo "Version: $version" + exit 0 + ;; -*) echo "unknown option: $1" break @@ -156,14 +176,22 @@ if [ "X${resultdir}" != X ] ; then cp ab.txt "${resultdir}/ab-${hversion}-${hostname}-${date}.txt" fi -if [ "X${email}" != X ] ; then - cat >> email-header < email-header < Subject: heimdal-build-log SPAM COOKIE X-heimdal-build: kaka-till-love +Version: $version + EOF + + if [ "X$passhrase" != X ] ; then + cat >> email-header <