Skip to content

Commit

Permalink
build: batch svg's for inkscape
Browse files Browse the repository at this point in the history
  • Loading branch information
vdbe committed Nov 25, 2024
1 parent 2a08ad5 commit 1857e2a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/build-xcursor-plasmasvg
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1857e2a

Please sign in to comment.