eden-mirror/tools/optimize-assets.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
355 B
Bash
Raw Permalink Normal View History

#!/bin/sh -e
# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
which optipng || exit
NPROC=$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)
# shellcheck disable=SC2038
find . -type f -iname '*.png' | xargs -P "$NPROC" -I {} optipng -o7 {}