add_icons.rb: support for adding scalable versions

This commit is contained in:
Moritz Bunkus 2018-12-30 18:35:33 +01:00
parent 0aee0cc2a6
commit 7698d43a55
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85

View File

@ -7,6 +7,15 @@ require "fileutils"
$base_dir = File.absolute_path(File.dirname(__FILE__) + "/../..")
ARGV.each do |file_name|
if %r{/scalable/}.match(file_name)
target = "#{$base_dir}/share/icons/scalable/" + file_name.gsub(/.*\//, '')
puts "#{file_name}#{target}"
FileUtils.cp file_name, target
next
end
size = FastImage.size file_name
if !size
puts "Warning: couldn't determine size for #{file_name}"