support parallel compression if available firefox55
authorWolfgang Rosenauer <wr@rosenauer.org>
Fri, 11 Aug 2017 10:35:58 +0200
branchfirefox55
changeset 990 0d76004e9fa4
parent 986 74bc4d049531
child 991 fde25c29562d
support parallel compression if available
MozillaFirefox/create-tar.sh
--- a/MozillaFirefox/create-tar.sh	Mon Aug 07 16:53:19 2017 +0200
+++ b/MozillaFirefox/create-tar.sh	Fri Aug 11 10:35:58 2017 +0200
@@ -7,8 +7,8 @@
 
 CHANNEL="release"
 BRANCH="releases/mozilla-$CHANNEL"
-RELEASE_TAG="9e30e915f1325f041d01c722bd640300f32dc9c3"  # 55.0 build3
-VERSION="55.0"
+RELEASE_TAG="FIREFOX_55_0_1_RELEASE"  # 55.0.1 build2
+VERSION="55.0.1"
 
 # mozilla
 if [ -d mozilla ]; then
@@ -40,8 +40,16 @@
 echo -n "REPO=" >> ../source-stamp.txt
 hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" >> ../source-stamp.txt
 popd
+
+# use parallel compression, if available
+compression='-J'
+pixz -h > /dev/null 2>&1
+if (($? != 127)); then
+  compression='-Ipixz'
+fi
+
 echo "creating archive..."
-tar cJf firefox-$VERSION-source.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla
+tar $compression -cf firefox-$VERSION-source.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla
 
 # l10n
 echo "fetching locales..."
@@ -60,10 +68,10 @@
   esac
 done
 echo "creating l10n archive..."
-tar cJf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n
+tar $compression -cf l10n-$VERSION.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n
 
 # compare-locales
 echo "creating compare-locales"
 hg clone http://hg.mozilla.org/build/compare-locales
-tar cJf compare-locales.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales
+tar $compression -cf compare-locales.tar.xz --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales