diff options
author | Marvin Borner | 2021-03-31 17:12:35 +0200 |
---|---|---|
committer | Marvin Borner | 2021-03-31 17:12:35 +0200 |
commit | 0d16626ad13677451970758ad7299540957bd89a (patch) | |
tree | b8964e9a8039c96082718ae116e7af057da42b9e /run | |
parent | 2bbca13614b90d4b64f1976900c206504a401717 (diff) |
Added older inkscape version support
Diffstat (limited to 'run')
-rwxr-xr-x | run | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -110,12 +110,20 @@ make_disk() { chess-rook" [ -d icons/ ] || git clone --depth=1 https://github.com/Templarian/MaterialDesign.git icons/ + inkscape_version="$(inkscape --version | awk '{print $2}' | cut -c1)" echo "$icons" | while read icon; do echo "Converting $icon" - inkscape -w 18 -h 18 icons/svg/"$icon".svg -o disk/icons/"$icon"-18.png - inkscape -w 24 -h 24 icons/svg/"$icon".svg -o disk/icons/"$icon"-24.png - inkscape -w 36 -h 36 icons/svg/"$icon".svg -o disk/icons/"$icon"-36.png - inkscape -w 48 -h 48 icons/svg/"$icon".svg -o disk/icons/"$icon"-48.png + if [ "$inkscape_version" = "0" ]; then + inkscape -z -w 18 -h 18 icons/svg/"$icon".svg -e disk/icons/"$icon"-18.png + inkscape -z -w 24 -h 24 icons/svg/"$icon".svg -e disk/icons/"$icon"-24.png + inkscape -z -w 36 -h 36 icons/svg/"$icon".svg -e disk/icons/"$icon"-36.png + inkscape -z -w 48 -h 48 icons/svg/"$icon".svg -e disk/icons/"$icon"-48.png + else + inkscape -w 18 -h 18 icons/svg/"$icon".svg -o disk/icons/"$icon"-18.png + inkscape -w 24 -h 24 icons/svg/"$icon".svg -o disk/icons/"$icon"-24.png + inkscape -w 36 -h 36 icons/svg/"$icon".svg -o disk/icons/"$icon"-36.png + inkscape -w 48 -h 48 icons/svg/"$icon".svg -o disk/icons/"$icon"-48.png + fi done echo "Done!" |