From: Ben Pfaff <blp@gnu.org>
Date: Thu, 18 Feb 2010 18:36:16 +0000 (-0800)
Subject: save distributed files to Git when we build binary, not source
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce89fa1471dad1b99a8b8f6bff68c74bf27299b0;p=pspp

save distributed files to Git when we build binary, not source
---

diff --git a/build-pspp b/build-pspp
index 4b3cf01b5b..d7983fd6d3 100755
--- a/build-pspp
+++ b/build-pspp
@@ -253,10 +253,6 @@ EOF
     $tarball = save_result ("source distribution", "pspp$build_number/_build/$tarname", 1);
     save_result ("translation templates", "pspp$build_number/_build/po/pspp.pot");
 
-    # Save distributed files in Git.
-    start_step ("Save distributed files in Git");
-    run ("GIT_DIR=$topdir/.git $topdir/git-import-tar $resultsdir/$tarname refs/builds/$build_number/dist", "git-dist");
-
     # Build user manual
     start_step ("Build user manual");
     run ("cd pspp$build_number && cp _build/doc/*.texi doc/");
@@ -270,6 +266,9 @@ EOF
 }
 
 if ($build_binary) {
+    start_step ("Save tarball to Git");
+    run ("GIT_DIR=$topdir/.git $topdir/git-import-tar $tarball refs/builds/$build_number/dist", "git-dist");
+
     start_step ("Determining $tarball target directory");
     my $sample_filename = `zcat $tarball | tar tf - | head -1`;
     my ($tarball_dir) = $sample_filename =~ m%^(?:[./])*([^/]+)/%;