Sun, 09 Apr 2023 15:59:08 +0300
Extracted the state of the program into a MainState structure, and extracted local functions of main() into static functions.
I was planning to make the core logic and state of the program into a Main class, which would be a QObject that would
have lots of signals and slots, but it looks like this works even without it
158 | 1 | #!/bin/bash |
2 | mkdir --parents icons | |
3 | for svgfile in $(find icons_svg -name '*.svg') | |
4 | do | |
5 | pngfile="icons/$(basename ${svgfile%.svg}.png)" | |
162
3ebe1a0ca818
only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
6 | if [[ ! -f "${pngfile}" ]] |
3ebe1a0ca818
only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
7 | then |
3ebe1a0ca818
only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
8 | echo "$svgfile => $pngfile" |
3ebe1a0ca818
only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
9 | convert -background none "${svgfile}" "${pngfile}" |
3ebe1a0ca818
only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents:
158
diff
changeset
|
10 | fi |
158 | 11 | done |