summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-06-23 12:41:38 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-06-23 12:41:38 +0000
commit4ca5109536f379359778a45655718dc6948ed2b5 (patch)
treea2284644eb28864edc75c09853e30fe3b15d787c
parentf4541cb711f6bdd9e5c96f1ec34cb184c674b8f6 (diff)
downloadmidipix_build-4ca5109536f379359778a45655718dc6948ed2b5.tar.bz2
midipix_build-4ca5109536f379359778a45655718dc6948ed2b5.tar.xz
999.tarballs.build: compress w/ multiple threads via pbzip2, pigz, or xz -T0, respectively.
-rw-r--r--999.tarballs.build17
1 files changed, 13 insertions, 4 deletions
diff --git a/999.tarballs.build b/999.tarballs.build
index a25a4c28..7ff794a7 100644
--- a/999.tarballs.build
+++ b/999.tarballs.build
@@ -10,11 +10,20 @@ else
update_build_status build_finish tarball_start;
cd ${PREFIX};
if [ "${TARBALL_SUFFIX}" = "bz2" ]; then
- TARBALL_COMPRESS_CMD="bzip2";
+ if [ -n "$(which pbzip2 2>/dev/null)" ]; then
+ TARBALL_COMPRESS_CMD="pbzip2";
+ else
+ TARBALL_COMPRESS_CMD="bzip2";
+ fi;
elif [ "${TARBALL_SUFFIX}" = "gz" ]; then
- TARBALL_COMPRESS_CMD="gzip";
+ if [ -n "$(which pigz 2>/dev/null)" ]; then
+ TARBALL_COMPRESS_CMD="pigz";
+ else
+ TARBALL_COMPRESS_CMD="gzip";
+ fi;
elif [ "${TARBALL_SUFFIX}" = "xz" ]; then
TARBALL_COMPRESS_CMD="xz";
+ TARBALL_COMPRESS_ARGS="-T0";
else
log_msg failexit "Unknown tarball suffix \`.${TARBALL_SUFFIX}'.";
fi;
@@ -35,7 +44,7 @@ log_msg info "Converted symbolic links in ${PREFIX_BASENAME}/lib to hard links."
tar -cpf - $(find_with_no_paths "${TARBALL_EXCLUDE_PATHS} native/lib.bak" . \
-mindepth 1 -maxdepth 2 -type d -not -path ./native) \
"Create \`Midipix mintty shell' shortcut.vbs" midipix.sh README |\
-${TARBALL_COMPRESS_CMD} -c > ${TARBALL_FNAME};
+${TARBALL_COMPRESS_CMD} ${TARBALL_COMPRESS_ARGS} -c > ${TARBALL_FNAME};
log_msg info "Finished building binary distribution tarball.";
if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] &&\
gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then
@@ -49,7 +58,7 @@ log_msg info "Restored ${PREFIX_BASENAME}/lib.";
log_msg info "Building source tarball...";
tar -cpf - $(find tmp -mindepth 1 -maxdepth 1 -type d) |\
-${TARBALL_COMPRESS_CMD} -c > ${TARBALL_SRC_FNAME};
+${TARBALL_COMPRESS_CMD} ${TARBALL_COMPRESS_ARGS} -c > ${TARBALL_SRC_FNAME};
log_msg info "Finished building source tarball.";
if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SRC_SIGN_GPG_KEY}" ] &&\
gpg --list-keys "${TARBALL_SRC_SIGN_GPG_KEY}" >/dev/null 2>&1; then