Browse Source

android: fix running mkicons.sh on modern systems

master
Reece H. Dunn 8 years ago
parent
commit
3d482c1674
1 changed files with 9 additions and 7 deletions
  1. 9
    7
      android/mkicons.sh

+ 9
- 7
android/mkicons.sh View File

@@ -1,13 +1,15 @@
#!/bin/bash

rsvg -w 24 -h 24 icons/launcher.svg res/drawable-ldpi/icon.png
rsvg -w 32 -h 32 icons/launcher.svg res/drawable-mdpi/icon.png
rsvg -w 48 -h 48 icons/launcher.svg res/drawable-hdpi/icon.png
rsvg -w 64 -h 64 icons/launcher.svg res/drawable-xhdpi/icon.png
RSVG=${RSVG:=rsvg-convert}

${RSVG} -w 24 -h 24 icons/launcher.svg > res/drawable-ldpi/icon.png
${RSVG} -w 32 -h 32 icons/launcher.svg > res/drawable-mdpi/icon.png
${RSVG} -w 48 -h 48 icons/launcher.svg > res/drawable-hdpi/icon.png
${RSVG} -w 64 -h 64 icons/launcher.svg > res/drawable-xhdpi/icon.png

ls icons/Flag_*.svg | while read flag ; do
rsvg -w 75 -h 50 $flag `echo $flag | sed -e 's,.svg,.png,g'`
${RSVG} -w 75 -h 50 $flag > `echo $flag | sed -e 's,.svg,.png,g'`
done

rsvg -w 1024 -h 500 icons/feature-graphic.svg icons/feature-graphic.png
rsvg -w 180 -h 120 icons/promo-graphic.svg icons/promo-graphic.png
${RSVG} -w 1024 -h 500 icons/feature-graphic.svg > icons/feature-graphic.png
${RSVG} -w 180 -h 120 icons/promo-graphic.svg > icons/promo-graphic.png

Loading…
Cancel
Save