1#!/bin/env ruby
2resolutions={
3 'mdpi'=> 1,
4 'hdpi' => 1.5,
5 'xhdpi' => 2,
6 'xxhdpi' => 3,
7 }
8images = {
9 'conversations_baloon.svg' => ['ic_launcher', 48],
10 'conversations_mono.svg' => ['ic_notification', 24],
11 'ic_received_indicator.svg' => ['ic_received_indicator', 12],
12 }
13images.each do |source, result|
14 resolutions.each do |name, factor|
15 size = factor * result[1]
16 path = "../src/main/res/drawable-#{name}/#{result[0]}.png"
17 cmd = "inkscape -e #{path} -C -h #{size} -w #{size} #{source}"
18 puts cmd
19 system cmd
20 end
21end