chiark
/
gitweb
/
~ian
/
xfonts-traditional.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a94959e
)
wip update
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2012 19:11:41 +0000
(19:11 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2012 19:11:41 +0000
(19:11 +0000)
update-xfonts-traditional
patch
|
blob
|
history
diff --git
a/update-xfonts-traditional
b/update-xfonts-traditional
index 606325932d6983804e86c49eae43e9b0b36baaed..e8ed7ab934b3a2e8575f5f55428d23b0ec8bbfbd 100755
(executable)
--- a/
update-xfonts-traditional
+++ b/
update-xfonts-traditional
@@
-153,6
+153,17
@@
sub loadfoundries () {
die "no foundry maps\n" unless %foundrymap;
}
die "no foundry maps\n" unless %foundrymap;
}
+sub processpcfgz ($$) {
+ my ($inpcfgz,$outpcfgz) = @_;
+ my $inh = new IO::File $inpcfgz, 'r', or die "$inpcfgz $!";
+ my $outh = new IO::File $outpcfgz, 'w' or die "$outpcfgz $!";
+ my $inpipe = new IO:Handle or die $!;
+ my $outpipe = new IO:Handle or die $!;
+ my $inchild = open $inpipe, "-|"; defined $inchild or die $!;
+ if (!$inchild) {
+
+ opne
+
sub processfontdir ($) {
my ($fontdir) = @_;
if (!opendir FD, $fontdir) {
sub processfontdir ($) {
my ($fontdir) = @_;
if (!opendir FD, $fontdir) {
@@
-160,9
+171,9
@@
sub processfontdir ($) {
return;
}
my $olddone = do "$fontdir/$donefile";
return;
}
my $olddone = do "$fontdir/$donefile";
- if (!$done) {
+ if (!$
old
done) {
die "$fontdir $! $@ " unless $!==&ENOENT;
die "$fontdir $! $@ " unless $!==&ENOENT;
- $done = { };
+ $
old
done = { };
}
my $newdone = { };
my $log = new IO::File "$fontdir/$logfile", "w"
}
my $newdone = { };
my $log = new IO::File "$fontdir/$logfile", "w"
@@
-185,7
+196,7
@@
sub processfontdir ($) {
}
die "$fontdir $dent" unless -f _;
my $stats = join ' ', ((stat _)[1,7,9,10]);
}
die "$fontdir $dent" unless -f _;
my $stats = join ' ', ((stat _)[1,7,9,10]);
- $tdone = $olddone->{$dent};
+
my
$tdone = $olddone->{$dent};
if (defined $tdone && $tdone eq $stats) {
$found{$dent} = 2;
$newdone->{$dent} = $stats;
if (defined $tdone && $tdone eq $stats) {
$found{$dent} = 2;
$newdone->{$dent} = $stats;
@@
-193,7
+204,9
@@
sub processfontdir ($) {
}
my $outdent = $fontprefix.$dent;
}
my $outdent = $fontprefix.$dent;
- my $r = processpcfgz("$fontdir/$dent","$fontdir/$outdent.new");
+ my $r = processpcfgz("$fontdir/$dent",
+ "$fontdir/$outdent.new",
+ $dent");
if ($r !~ m/^\d/) {
print $logfile "%s: unchanged - %s\n", $dent, $r;
unlink "$fontdir/$outdent.new" or die "$fontdir $outdent $!";
if ($r !~ m/^\d/) {
print $logfile "%s: unchanged - %s\n", $dent, $r;
unlink "$fontdir/$outdent.new" or die "$fontdir $outdent $!";