diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-08-09 23:02:28 -0600 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-08-09 23:02:28 -0600 |
commit | 3973223593ab7bded806f02473164ac105f2896e (patch) | |
tree | 8d25f57587dd50b76affa5fe5ff1b87c85a01452 /tools/make-tarball | |
parent | 537477335449c7730633d321905c57f694441eb3 (diff) | |
download | vyos-cloud-init-3973223593ab7bded806f02473164ac105f2896e.tar.gz vyos-cloud-init-3973223593ab7bded806f02473164ac105f2896e.zip |
make-tarball: older versions of git with --format=tar.
Some older versions of git (Centos 6) do not have --format=tar.gz.
To work around this, create a .tar file and then compress it.
Diffstat (limited to 'tools/make-tarball')
-rwxr-xr-x | tools/make-tarball | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/make-tarball b/tools/make-tarball index d8705896..c150dd2f 100755 --- a/tools/make-tarball +++ b/tools/make-tarball @@ -55,5 +55,9 @@ 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) +tar=${output##*/} +tar="$TEMP_D/${tar%.gz}" +git archive --format=tar --prefix="$archive_base/" "$rev" > "$tar" +gzip -9 -c "$tar" > "$output" echo "$output" |