summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-06-18 15:27:37 +0000
committerNorbert Preining <preining@logic.at>2009-06-18 15:27:37 +0000
commitd1922d9757b6e9e3c13258eccd8db9712be5e3d5 (patch)
treec1ef30cf5f0c9a3fb8f82b7c2e1cbccfdf652eb1 /Master
parent1ac1fdfecf2b49272aed30d2649551a6fa2dff7e (diff)
rewrite the format checks in check-execute-consistency, and make sure
that cygwins special dangling symlinks are recognized as ok git-svn-id: svn://tug.org/texlive/trunk@13816 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/tlpkg/bin/check-execute-consistency41
1 files changed, 27 insertions, 14 deletions
diff --git a/Master/tlpkg/bin/check-execute-consistency b/Master/tlpkg/bin/check-execute-consistency
index 2a1729359b0..562229f35c8 100755
--- a/Master/tlpkg/bin/check-execute-consistency
+++ b/Master/tlpkg/bin/check-execute-consistency
@@ -137,25 +137,25 @@ sub main
next if ($name eq "cont-en");
# we check that the name exist in bin/$arch
for my $a ($tlpdb->available_architectures) {
- if (! -r "$Master/bin/$a/$name") {
- if (($a eq "win32") || ($a eq "i386-cygwin")) {
- if (! ( -r "$Master/bin/$a/$name.exe" ||
- -r "$Master/bin/$a/$name.bat")) {
+ my $f = "$Master/bin/$a/$name";
+ if (!check_file($a, $f)) {
+ if ($a eq "i386-cygwin") {
+ # on cygwin the following can happen: xmltex -> pdftex, but
+ # there is only pdftex.exe, so -r does not succeed
+ if (-l $f) {
+ my $ld = readlink ($f);
+ if (!check_file($a, "$Master/bin/$a/$ld")) {
+ push @{$missingbins{$_}}, "bin/$a/$name" if $mode;
+ }
+ } else {
push @{$missingbins{$_}}, "bin/$a/$name" if $mode;
}
} else {
push @{$missingbins{$_}}, "bin/$a/$name" if $mode;
}
}
- if (! -r "$Master/bin/$a/$engine") {
- if (($a eq "win32") || ($a eq "i386-cygwin")) {
- if (! (-r "$Master/bin/$a/$engine.exe" ||
- -r "$Master/bin/$a/$engine.bat")) {
- push @{$missingengines{$_}}, "bin/$a/$engine" if $mode;
- }
- } else {
- push @{$missingengines{$_}}, "bin/$a/$engine" if $mode;
- }
+ if (!check_file($a, "$Master/bin/$a/$engine")) {
+ push @{$missingengines{$_}}, "bin/$a/$engine" if $mode;
}
}
# check for the existence of the .ini file
@@ -193,7 +193,20 @@ sub main
}
}
-
+sub check_file {
+ my ($a, $f) = @_;
+ if (-r $f) {
+ return 1;
+ } else {
+ # not -r, so check for the extensions .bat and .exe on w32 and cygwin
+ if (($a eq "win32") || ($a eq "i386-cygwin")) {
+ if (-r "$f.exe" || -r "$f.bat") {
+ return 1;
+ }
+ }
+ return 0;
+ }
+}
__END__