aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-10-11 15:08:23 -0700
committerAnders Broman <a.broman58@gmail.com>2018-10-12 05:04:45 +0000
commitc5d46c1986e6ed9a6b47cc4992fe23965096a139 (patch)
treea9ea2ed6355cd285f4a7d993715605c21ae185f6 /tools
parent659966d29b0f9ad065f765c526050d52f9c67e80 (diff)
Tools: Compress our tarball using threads.
Check to see if xz supports threads and enable them if that's the case. Change-Id: I8a0e7100fec98e5b7d7ccd9a987f7782bf7c7512 Reviewed-on: https://code.wireshark.org/review/30137 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/git-export-release.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/git-export-release.sh b/tools/git-export-release.sh
index 168b87eda3..f19d6c7039 100755
--- a/tools/git-export-release.sh
+++ b/tools/git-export-release.sh
@@ -41,6 +41,7 @@ fi
DESCRIPTION=$(git describe --abbrev=8 --match "v[1-9]*" "${COMMIT}")
VERSION=${DESCRIPTION#v}
STASH_POP=False
+XZ_OPTS=
# We might be able to avoid stashing by doing one of the following:
#
@@ -75,7 +76,9 @@ fi
echo "Creating wireshark-$VERSION.tar.xz"
-git archive --prefix="wireshark-${VERSION}/" ${COMMIT} | xz > "${DESTDIR}/wireshark-${VERSION}.tar.xz"
+echo . | xz --threads=0 > /dev/null 2>&1 && XZ_OPTS=--threads=0
+
+git archive --prefix="wireshark-${VERSION}/" ${COMMIT} | xz $XZ_OPTS > "${DESTDIR}/wireshark-${VERSION}.tar.xz"
if [ "$STASH_POP" == "True" ] ; then
git stash pop