new tool to convert meta version of ardour3_ui.rc.in into the real thing

git-svn-id: svn://localhost/ardour2/branches/3.0@8587 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-01-27 03:15:55 +00:00
parent 15b5fce904
commit d2289f6d14

23
tools/gtkrcify Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/perl
%colors;
while (<>) {
if (/^#\@define/) {
@words = split;
$colors{$words[1]} = $words[2];
next;
} elsif (/\@COLOR_SCHEME\@/) {
$scheme_string="";
foreach $key (sort keys %colors) {
$scheme_string .= "A_$key:$colors{$key};"
}
chop $scheme_string;
s/\@COLOR_SCHEME\@/$scheme_string/;
print;
next;
} else {
print;
}
}