svg-to-png.sh

Wed, 19 Apr 2023 22:42:43 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Wed, 19 Apr 2023 22:42:43 +0300
changeset 380
16f6717a218b
parent 162
3ebe1a0ca818
permissions
-rwxr-xr-x

Use QFileInfo to represent paths

#!/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