Skip to content

Instantly share code, notes, and snippets.

@harlowja
Created August 9, 2016 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harlowja/d8797ed6c8db9e119020c64a160118f4 to your computer and use it in GitHub Desktop.
Save harlowja/d8797ed6c8db9e119020c64a160118f4 to your computer and use it in GitHub Desktop.
--- a/tools/make-tarball
+++ b/tools/make-tarball
@@ -55,5 +55,15 @@ if [ "$rev" = HEAD ] && ! git diff-index --quiet HEAD --; then
fi
fi
-git archive --format=tar.gz --prefix="$archive_base/" "$rev" > "$output"
+TEMP_D=$(mktemp -d)
+working_dir=$PWD
+git archive --format=tar --prefix="$archive_base/" "$rev" > "$TEMP_D/$archive_base.tar"
+cd $TEMP_D/
+gzip "$archive_base.tar"
+mv "$archive_base.tar.gz" $working_dir/$output
+
echo "$output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment