Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: scripts/bitmaps/makelines

Issue 4158003: Change bitmap scripts for two-color/two-font text labeling. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « scripts/bitmaps/make_bmp_images.sh ('k') | scripts/bitmaps/originals/DeveloperBmp.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/perl
2
3 use strict;
4 our $opt_u = 'http://www.chromium.org';
5 our $opt_m = 'Unsupported Prototype 0000';
6 our $opt_d = '.';
7
8 use File::Basename;
9 my $progdir = dirname($0);
10 my $prog = basename($0);
11
12 use Getopt::Std;
13 my $usage = "
14 Usage: $prog
15
16 ";
17 getopts('u:m:d:') or die $usage;
18
19 my @old = glob("$opt_d/linetxt_*");
20 unlink(@old) if @old;
21
22 $/ = undef;
23 $_ = <>;
24 s/\s+$//gs;
25
26 my $count = 1;
27 foreach (split(/\n/, $_))
28 {
29 s/^\s+//;
30 s/\s+$//;
31 s/\$URL/$opt_u/g;
32 s/\$MODEL/$opt_m/g;
33 $_ = ' ' unless $_;
34 my $big = s/^\$BIG:\s*//;
35 my $filename = sprintf('%s/linetxt_%02d.%s', $opt_d, $count++,
36 $big ? 'TXT' : 'txt');
37 # print "$filename: ($_)\n"; next;
38 open(OUT, ">$filename") || die "$0 can't write $filename: $!\n";
39 print OUT "$_";
40 close(OUT);
41 }
OLDNEW
« no previous file with comments | « scripts/bitmaps/make_bmp_images.sh ('k') | scripts/bitmaps/originals/DeveloperBmp.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698