cb8ac0e9b4
* Mon Nov 30 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc6.90] - Temporarily backout parallel xz script ("Justin M. Forbes") - build_configs.sh: Fix syntax flagged by shellcheck (Ben Crocker) - genspec.sh: Fix syntax flagged by shellcheck (Ben Crocker) - ark-rebase-patches.sh: Fix for shellcheck (Ben Crocker) - ark-create-release.sh: Fix syntax flagged by shellcheck (Ben Crocker) - merge-subtrees.sh: Fix syntax flagged by shellcheck (Ben Crocker) - rh-dist-git.sh: Fix syntax flagged by shellcheck (Ben Crocker) - update_scripts.sh: Fix syntax flagged by shellcheck (Ben Crocker) - x86_rngd.sh: Fix syntax flagged by shellcheck (Ben Crocker) - parallel_xz.sh: Fix syntax flagged by shellcheck (Ben Crocker) - expand_srpm.sh: Fix syntax flagged by shellcheck (Ben Crocker) - create-tarball.sh: Fix syntax flagged by shellcheck (Ben Crocker) - generate_bls_conf.sh: Fix syntax flagged by shellcheck (Ben Crocker) - clone_tree.sh: Fix syntax flagged by shellcheck (Ben Crocker) - new_release.sh: Fix syntax flagged by shellcheck (Ben Crocker) - download_cross.sh: Fix syntax flagged by shellcheck (Ben Crocker) - create_distgit_changelog.sh: Fix syntax flagged by shellcheck (Ben Crocker) - generate_cross_report.sh: Fix syntax flagged by shellcheck (Ben Crocker) - run_kabi-dw.sh: Fix syntax flagged by shellcheck (Ben Crocker) - mod-blacklist.sh: Fix syntax flagged by shellcheck (Ben Crocker) - scripts/configdiff.sh: Fix syntax flagged by shellcheck (Ben Crocker) - self-test/0001-shellcheck.bats: check for shellcheck (Ben Crocker) - self-test/1001-rpmlint.bats, 1003-rpminspect.bats (Ben Crocker) - Makefile, Makefile.common, egit.sh, 1005-dist-dump-variables.bats (Ben Crocker) - Add GIT macro to Makefile and Makefile.common: (Ben Crocker) Resolves: rhbz# Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
27 lines
733 B
Bash
Executable File
27 lines
733 B
Bash
Executable File
#!/bin/sh
|
|
# Reads filenames on stdin, xz-compresses each in place.
|
|
# Not optimal for "compress relatively few, large files" scenario!
|
|
|
|
# How many xz's to run in parallel:
|
|
procgroup=""
|
|
while test "$#" != 0; do
|
|
# Get it from -jNUM
|
|
N="${1#-j}"
|
|
if test "$N" = "$1"; then
|
|
# Not -j<something> - warn and ignore
|
|
echo "parallel_xz: warning: unrecognized argument: '$1'"
|
|
else
|
|
procgroup="$N"
|
|
fi
|
|
shift
|
|
done
|
|
|
|
# If told to use only one cpu:
|
|
test "$procgroup" || exec xargs -r xz
|
|
test "$procgroup" = 1 && exec xargs -r xz
|
|
|
|
# xz has some startup cost. If files are really small,
|
|
# this cost might be significant. To combat this,
|
|
# process several files (in sequence) by each xz process via -n 16:
|
|
exec xargs -r -n 16 -P "$procgroup" xz
|