projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a5f96d8
)
Works OK. Add --batch
author
Ben Pfaff
<blp@gnu.org>
Tue, 16 Feb 2010 05:01:31 +0000
(21:01 -0800)
committer
Ben Pfaff
<blp@gnu.org>
Tue, 16 Feb 2010 05:01:31 +0000
(21:01 -0800)
build-pspp
patch
|
blob
|
history
diff --git
a/build-pspp
b/build-pspp
index 3d3959095ac1d6449ce2e2aa2b0b85d0496dbdeb..724221cebd23c8fdc083e85eedb29cc3124251e2 100755
(executable)
--- a/
build-pspp
+++ b/
build-pspp
@@
-9,8
+9,10
@@
use warnings;
my $help = 0;
my $build_binary = 1;
my $help = 0;
my $build_binary = 1;
+my $batch = 0;
GetOptions ("h|help" => \$help,
GetOptions ("h|help" => \$help,
- "binary!" => \$build_binary);
+ "binary!" => \$build_binary,
+ "batch!" => \$batch);
usage () if $help;
usage () if $help;
@@
-22,6
+24,7
@@
chomp $builder;
# Select build number.
my $build_number = POSIX::strftime("%Y%m%d%H%M%S", localtime);
# Select build number.
my $build_number = POSIX::strftime("%Y%m%d%H%M%S", localtime);
+print "$build_number\n" if $batch;
my $topdir = getcwd ();
my $topdir = getcwd ();
@@
-43,7
+46,7
@@
set_var ("build_number", $build_number);
sub start_step {
my ($msg) = @_;
print LOG "
\f
\n$msg\n";
sub start_step {
my ($msg) = @_;
print LOG "
\f
\n$msg\n";
- print "$msg\n";
+ print "$msg\n"
unless $batch
;
}
sub set_var {
}
sub set_var {
@@
-53,7
+56,7
@@
sub set_var {
print VAR "$value\n";
close VAR;
print LOG "$var=$value\n";
print VAR "$value\n";
close VAR;
print LOG "$var=$value\n";
- print "\t$var=$value\n";
+ print "\t$var=$value\n"
unless $batch
;
}
sub save_result {
}
sub save_result {
@@
-98,6
+101,7
@@
if (@ARGV == 2) {
# Extract source.
start_step ("Extract branch into $builddir/pspp$build_number");
run ("git archive --format=tar --prefix=pspp$build_number/ buildtmp/$$/pspp | (cd $builddir && tar xf -)");
# Extract source.
start_step ("Extract branch into $builddir/pspp$build_number");
run ("git archive --format=tar --prefix=pspp$build_number/ buildtmp/$$/pspp | (cd $builddir && tar xf -)");
+ run ("git branch -D buildtmp/$$/pspp");
# Extract version number.
start_step ("Extract repository version number");
# Extract version number.
start_step ("Extract repository version number");
@@
-290,6
+294,8
@@
where TARBALL is the name of a tarball produced by "make dist"
Options:
--help Print this usage message and exit
Options:
--help Print this usage message and exit
+ --no-binary Build source tarballs but no binaries.
+ --batch Do not print progress to stdout.
EOF
exit(0);
}
EOF
exit(0);
}
@@
-329,20
+335,21
@@
sub try_run {
$progress .= sprintf ", ETA %d s", $left;
}
}
$progress .= sprintf ", ETA %d s", $left;
}
}
- print "\r$progress", " " x (79 - length ($progress)), "\r";
+ print "\r$progress", " " x (79 - length ($progress)), "\r"
+ unless $batch;
}
close (COMMAND);
}
close (COMMAND);
- print "\r", " " x 79, "\r";
+ print "\r", " " x 79, "\r"
unless $batch
;
write_timing ($id, time () - $start) if defined ($id);
return 1 if !$?;
if ($? & 127) {
write_timing ($id, time () - $start) if defined ($id);
return 1 if !$?;
if ($? & 127) {
- printf "%s: child died with signal %d, %s coredump\n",
+ printf
STDERR
"%s: child died with signal %d, %s coredump\n",
$command, ($? & 127), ($? & 128) ? 'with' : 'without';
} else {
$command, ($? & 127), ($? & 128) ? 'with' : 'without';
} else {
- printf "%s: child exited with value %d\n", $command, $? >> 8;
+ printf
STDERR
"%s: child exited with value %d\n", $command, $? >> 8;
}
return 0;
}
}
return 0;
}