[tools] fix optimize-assets not being multithreaded due to -print0 (#2887)

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2887
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-10-29 13:09:05 +01:00 committed by crueter
parent b50f8c620b
commit c31761ab75
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
1 changed files with 3 additions and 1 deletions

View File

@ -2,4 +2,6 @@
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project # SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
which optipng || exit which optipng || exit
find . -type f -iname '*.png' -print0 | xargs -0 -P 16 -I {} optipng -o7 {} NPROC=$(nproc)
[ -z "$NPROC" ] && NPROC=8
find . -type f -iname '*.png' | xargs -P $NPROC -I {} optipng -o7 {}