svg-to-png.sh

Sat, 11 Jun 2022 15:20:24 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sat, 11 Jun 2022 15:20:24 +0300
changeset 213
ee5758ddb6d2
parent 162
3ebe1a0ca818
permissions
-rwxr-xr-x

Rewrite prune to use graphs rather than O(n²) searches

#!/bin/bash
mkdir --parents icons
for svgfile in $(find icons_svg -name '*.svg')
do
	pngfile="icons/$(basename ${svgfile%.svg}.png)"
	if [[ ! -f "${pngfile}" ]]
	then
		echo "$svgfile => $pngfile"
		convert -background none "${svgfile}" "${pngfile}"
	fi
done

mercurial