From 0d16626ad13677451970758ad7299540957bd89a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 31 Mar 2021 17:12:35 +0200 Subject: Added older inkscape version support --- run | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'run') diff --git a/run b/run index 60e57b6..a665973 100755 --- a/run +++ b/run @@ -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!" -- cgit v1.2.3