4ca510
999.tarballs.build: compress w/ multiple threads via pbzip2, pigz, or xz -T0, respectively.
@@ -10,11 +10,20 @@ else
|
|
10
10
|
update_build_status build_finish tarball_start;
|
11
11
|
cd ${PREFIX};
|
12
12
|
if [ "${TARBALL_SUFFIX}" = "bz2" ]; then
|
13
|
-
|
13
|
+
if [ -n "$(which pbzip2 2>/dev/null)" ]; then
|
14
|
+
TARBALL_COMPRESS_CMD="pbzip2";
|
15
|
+
else
|
16
|
+
TARBALL_COMPRESS_CMD="bzip2";
|
17
|
+
fi;
|
14
18
|
elif [ "${TARBALL_SUFFIX}" = "gz" ]; then
|
15
|
-
|
19
|
+
if [ -n "$(which pigz 2>/dev/null)" ]; then
|
20
|
+
TARBALL_COMPRESS_CMD="pigz";
|
21
|
+
else
|
22
|
+
TARBALL_COMPRESS_CMD="gzip";
|
23
|
+
fi;
|
16
24
|
elif [ "${TARBALL_SUFFIX}" = "xz" ]; then
|
17
25
|
TARBALL_COMPRESS_CMD="xz";
|
26
|
+
TARBALL_COMPRESS_ARGS="-T0";
|
18
27
|
else
|
19
28
|
log_msg failexit "Unknown tarball suffix \`.${TARBALL_SUFFIX}'.";
|
20
29
|
fi;
|
@@ -35,7 +44,7 @@ log_msg info "Converted symbolic links in ${PREFIX_BASENAME}/lib to hard links."
|
|
35
44
|
tar -cpf - $(find_with_no_paths "${TARBALL_EXCLUDE_PATHS} native/lib.bak" . \
|
36
45
|
-mindepth 1 -maxdepth 2 -type d -not -path ./native) \
|
37
46
|
"Create \`Midipix mintty shell' shortcut.vbs" midipix.sh README |\
|
38
|
-
{TARBALL_COMPRESS_CMD} -c > ${TARBALL_FNAME};
|
47
|
+
{TARBALL_COMPRESS_CMD} ${TARBALL_COMPRESS_ARGS} -c > ${TARBALL_FNAME};
|
39
48
|
log_msg info "Finished building binary distribution tarball.";
|
40
49
|
if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SIGN_GPG_KEY}" ] &&\
|
41
50
|
gpg --list-keys "${TARBALL_SIGN_GPG_KEY}" >/dev/null 2>&1; then
|
@@ -49,7 +58,7 @@ log_msg info "Restored ${PREFIX_BASENAME}/lib.";
|
|
49
58
|
|
50
59
|
log_msg info "Building source tarball...";
|
51
60
|
tar -cpf - $(find tmp -mindepth 1 -maxdepth 1 -type d) |\
|
52
|
-
{TARBALL_COMPRESS_CMD} -c > ${TARBALL_SRC_FNAME};
|
61
|
+
{TARBALL_COMPRESS_CMD} ${TARBALL_COMPRESS_ARGS} -c > ${TARBALL_SRC_FNAME};
|
53
62
|
log_msg info "Finished building source tarball.";
|
54
63
|
if [ -x "$(which gpg 2>/dev/null)" -a -n "${TARBALL_SRC_SIGN_GPG_KEY}" ] &&\
|
55
64
|
gpg --list-keys "${TARBALL_SRC_SIGN_GPG_KEY}" >/dev/null 2>&1; then
|