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