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