Merge pull request #174689 from alyssais/compress-firmware-empty

compressFirmwareXz: fix with empty lib/firmware
This commit is contained in:
adisbladis 2022-05-26 16:02:11 +08:00 committed by GitHub
commit 6d6531477a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,7 @@ runCommand "${firmware.name}-xz" {} ''
(cd ${firmware} && find lib/firmware -type d -print0) |
(cd $out && xargs -0 mkdir -v --)
(cd ${firmware} && find lib/firmware -type f -print0) |
(cd $out && xargs -0tP "$NIX_BUILD_CORES" -n1 \
(cd $out && xargs -0rtP "$NIX_BUILD_CORES" -n1 \
sh -c 'xz -9c -T1 -C crc32 --lzma2=dict=2MiB "${firmware}/$1" > "$1.xz"' --)
(cd ${firmware} && find lib/firmware -type l) | while read link; do
target="$(readlink "${firmware}/$link")"