Update of /cvsroot/fink/scripts/bindist In directory sc8-pr-cvs1:/tmp/cvs-serv9812
Modified Files: Tag: remis-bindist buildone Log Message: Forces the rebuild of given package and adds the deb file to the bin dist if the buildcheck is successful Index: buildone =================================================================== RCS file: /cvsroot/fink/scripts/bindist/buildone,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- buildone 26 Apr 2003 23:16:33 -0000 1.2 +++ buildone 21 Dec 2003 23:55:32 -0000 1.2.2.1 @@ -1,8 +1,29 @@ -#!/usr/bin/perl -my $filename = @ARGV[0]; -my $LOGDIR = $ENV{LOGDIR} or die "You must set the environment variable LOGDIR before running this script"; -system "./purge-nonbase.sh"; -print "Non-essential files purged...\n"; -print "printf '\\n\\n' | sudo fink --yes build $filename > $LOGDIR/$filename.log 2>&1\n"; -my $output = system "printf '\n\n' | sudo fink --yes build $filename > $LOGDIR/$filename.log 2>&1"; -system "sudo ./buildcheck $filename"; +#!/usr/bin/perl -w + +$| = 1; # flush buffers +$! = 1; # return value for die +use strict; + +my ($error, $pname, $bdlogdir); +$pname = $ARGV[0]; +die "You must give a package name as argument\n" unless $pname; + +$bdlogdir = $ENV{BDLOGDIR} or die "You must set the environment variable BDLOGDIR before running this script.\n"; + +die "Cannot find $ENV{BDDATA}/purge-nonbase.sh. Is your environment set up?\n" unless ( -x "$ENV{BDDATA}/purge-nonbase.sh" ); +$error = system "$ENV{BDDATA}/purge-nonbase.sh"; +print "Non-essential files purged...\n" if (defined $ENV{BDDEBUG}); + +print "Building $pname...\n" if (defined $ENV{BDDEBUG}); +$error += system "printf '\n\n' | sudo fink --yes rebuild $pname > $bdlogdir/$pname.log 2>&1"; +#$error += system "rm -f $bdlogdir/$pname.log.gz && gzip $bdlogdir/$pname.log"; + +print "checking if $pname is built...\n" if (defined $ENV{BDDEBUG}); +$error += system "sudo $ENV{BDDATA}/buildcheck $pname"; + +if (not $error) { + print "adding $pname to binary distribution...\n" if (defined $ENV{BDDEBUG}); + $error += system "$ENV{BDDATA}/bdadd $pname"; +} + +exit $error; ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Fink-commits mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/fink-commits