projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1980277
)
Add dist_dir to output variables.
author
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 26 Mar 2010 03:55:23 +0000
(20:55 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 26 Mar 2010 03:55:23 +0000
(20:55 -0700)
build-pspp
patch
|
blob
|
history
diff --git
a/build-pspp
b/build-pspp
index d45a9efba7990d224d093790f0e8e7d51ff8969a..ae723f7de4922f2ccd58695098b4f499af5cc8b9 100755
(executable)
--- a/
build-pspp
+++ b/
build-pspp
@@
-66,6
+66,8
@@
chomp $build_host;
set_var ("build_host", $build_host);
set_var ("build_number", $build_number);
set_var ("build_host", $build_host);
set_var ("build_number", $build_number);
+our $GIT = "git --git-dir=$topdir/.git";
+
sub start_step {
my ($msg) = @_;
print LOG "
\f
\n$msg\n";
sub start_step {
my ($msg) = @_;
print LOG "
\f
\n$msg\n";
@@
-122,8
+124,6
@@
sub ref_to_commit {
return $commit;
}
return $commit;
}
-my $GIT = "git --git-dir=$topdir/.git";
-
if (@ARGV == 2) {
my ($repo, $branch) = @ARGV;
if (@ARGV == 2) {
my ($repo, $branch) = @ARGV;
@@
-286,6
+286,11
@@
if ($build_binary) {
set_var ("dist_ref", "refs/builds/$build_number/dist");
set_var ("dist_commit", ref_to_commit ("refs/builds/$build_number/dist"));
set_var ("dist_ref", "refs/builds/$build_number/dist");
set_var ("dist_commit", ref_to_commit ("refs/builds/$build_number/dist"));
+ start_step ("Determining $tarball target directory");
+ my $sample_filename = `zcat $tarball | tar tf - | head -1`;
+ my ($tarball_dir) = $sample_filename =~ m%^(?:[./])*([^/]+)/%;
+ set_var ("dist_dir", $tarball_dir);
+
start_step ("Extracting source tarball");
run ("zcat $tarball | (cd $builddir && tar xf -)");
start_step ("Extracting source tarball");
run ("zcat $tarball | (cd $builddir && tar xf -)");