From cec18c83ceb51e6aa184af4a666d1e05b1aaf5f8 Mon Sep 17 00:00:00 2001 From: vdbe <44153531+vdbe@users.noreply.github.com> Date: Wed, 27 Nov 2024 00:46:08 +0000 Subject: [PATCH] build: batch svgs for inkscape (again) (#54) --- scripts/build-xcursor-plasmasvg | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/build-xcursor-plasmasvg b/scripts/build-xcursor-plasmasvg index e13d7bc7..0e95ef28 100755 --- a/scripts/build-xcursor-plasmasvg +++ b/scripts/build-xcursor-plasmasvg @@ -20,23 +20,24 @@ done mkdir -p "$BUILD_DIR/config" # Generate pixmaps +genPixmaps="" for RAWSVG in ${RAWSVG_DIR}/*.svg; do BASENAME=${RAWSVG##*/} BASENAME=${BASENAME%.*} - genPixmaps="file-open:${RAWSVG};" + genPixmaps+=" file-open:${RAWSVG};" for scale in $SCALES; do DIR="$BUILD_DIR/x${scale}" if [[ "${DIR}/${BASENAME}.png" -ot ${RAWSVG} ]]; then - genPixmaps="${genPixmaps} export-width:$((${REAL_SIZE}*scale/100)); export-height:$((${REAL_SIZE}*scale/100)); export-filename:${DIR}/${BASENAME}.png; export-do;" + genPixmaps+=" export-width:$((${REAL_SIZE}*scale/100)); export-height:$((${REAL_SIZE}*scale/100)); export-filename:${DIR}/${BASENAME}.png; export-do;" fi done - if [ "$genPixmaps" != "file-open:${RAWSVG};" ]; then - inkscape --shell <<<${genPixmaps} &>/dev/null - fi + genPixmaps+=" file-close;" done +inkscape --shell <<<${genPixmaps} &>/dev/null + # Generate cursor theme OUTPUT=$3 rm -rf "$OUTPUT"