if ($vverbose) {print "Debug -- Config: ".Dumper($config);}\r
\r
# Test the unix find command:\r
- if (! exists $odr->{unixfind}->{value}) {\r
- $odr->{unixfind}->{value} = "C:\\tools\\cygwin\\bin";\r
- }\r
- local $unixfind = $odr->{unixfind}->{value};\r
-\r
- local $savedPATH = $ENV{PATH};\r
- $ENV{PATH} = $unixfind.";".$savedPATH;\r
- print "Info -- chdir to ".`cd`."\n" if ($verbose);\r
- if (-e "a.tmp") {!system("rm a.tmp") or die "Fatal -- Couldn't clean temporary file a.tmp.";}\r
- !system("find . -maxdepth 0 -name a.tmp > b.tmp 2>&1") or die "Fatal -- find test failed.";\r
- local $filesize = -s "b.tmp";\r
- $ENV{PATH} = $savedPATH;\r
- if ($filesize > 0) {\r
- die "Fatal -- $unixfind does not appear to be a path to a UNIX find command.";\r
+ # List of directories where it might be:\r
+ my @find_dirs = ('c:\\cygwin\\bin', 'c:\\tools\\cygwin\\bin');\r
+ if (exists $odr->{unixfind}->{value}) { ## Was an additional place to look specified?\r
+ push (@find_dirs, $odr->{unixfind}->{value});\r
}\r
- \r
+ my $bFindFound = 0;\r
+ foreach my $dir (@find_dirs) {\r
+ if (-d $dir) {\r
+ local $savedPATH = $ENV{PATH};\r
+ $ENV{PATH} = $dir.";".$savedPATH;\r
+ if (-e "a.tmp") {!system("rm a.tmp") or die "Fatal -- Couldn't clean temporary file a.tmp.";}\r
+ !system("find . -maxdepth 0 -name a.tmp > b.tmp 2>&1") or die "Fatal -- find test failed.";\r
+ local $filesize = -s "b.tmp";\r
+ $ENV{PATH} = $savedPATH;\r
+ if ($filesize <= 0) {\r
+ $bFindFound = 1;\r
+ $odr->{unixfind}->{value} = $dir;\r
+ last;\r
+ }\r
+ }\r
+ }\r
+ if (! $bFindFound) {\r
+ print "Fatal -- unix find command not found in \n";\r
+ map {print " $_ "} @find_dirs;\r
+ print "\n";\r
+ die;\r
+ }\r
+ \r
# Don't allow /svntag and /svnbranch simultaneously:\r
if ( (length $odr->{svntag}->{value} > 0) && \r
(length $odr->{svnbranch}->{value} > 0) ) {\r
}\r
}\r
\r
- print "Executing $cmdline\n";\r
- local $argvsize = @ARGV;\r
- if ($argvsize > 0) {\r
- print "\nArguments for NMAKE: ";\r
- map {print " $_ "} @ARGV;\r
- print "\n";\r
- }\r
- \r
# (------------------------------------------------)\r
if ( (-d $wd) && ( ($rverb =~ /export/) || ($rverb =~ /checkout/) ) ) {\r
print "\n\nHEADS UP!!\n\n";\r
$l->no_die_handler; ## Needed so XML::Simple won't throw exceptions.\r
}\r
\r
+ print "Executing $cmdline\n";\r
+ local $argvsize = @ARGV;\r
+ if ($argvsize > 0) {\r
+ print "\nArguments for NMAKE: ";\r
+ map {print " $_ "} @ARGV;\r
+ print "\n";\r
+ }\r
+ \r
+ print "Info -- Using unix find in $odr->{unixfind}->{value}\n" if ($verbose);\r
+\r
##++ Begin repository action:\r
if ($rverb =~ /skip/) {print "Info -- *** Skipping repository access.\n" if ($verbose);}\r
else {\r