svnno****@sourc*****
svnno****@sourc*****
2011年 11月 19日 (土) 22:39:16 JST
Revision: 4731 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4731 Author: maya Date: 2011-11-19 22:39:16 +0900 (Sat, 19 Nov 2011) Log Message: ----------- ãã¡ã¤ã«æ´æ°ãã§ãã¯ã®ãã°ãä¿®æ£ Modified Paths: -------------- trunk/doc/htmlhelp_update_check.pl -------------- next part -------------- Modified: trunk/doc/htmlhelp_update_check.pl =================================================================== --- trunk/doc/htmlhelp_update_check.pl 2011-11-19 13:22:16 UTC (rev 4730) +++ trunk/doc/htmlhelp_update_check.pl 2011-11-19 13:39:16 UTC (rev 4731) @@ -7,8 +7,8 @@ # perl htmlhelp_update_check.pl ja chm_file_name # -use Cwd; - @ dirstack = (); +use Cwd; + @ dirstack = (); $ret = do_main($ARGV[0], $ARGV[1]); if ($ret) { @@ -25,23 +25,23 @@ } -sub get_file_paths { - my ($top_dir, $chmupdated)= @_; - my @paths=(); - my @temp = (); - - #-- JgÌêðæ¾ --# - opendir(DIR, $top_dir); - @temp = readdir(DIR); - closedir(DIR); - foreach my $path (sort @temp) { +sub get_file_paths { + my ($top_dir, $chmupdated)= @_; + my @paths=(); + my @temp = (); + + #-- JgÌêðæ¾ --# + opendir(DIR, $top_dir); + @temp = readdir(DIR); + closedir(DIR); + foreach my $path (sort @temp) { next if( $path =~ /^\.{1,2}$/ ); # '.' Æ '..' ÍXLbv next if( $path =~ /^\.svn$/ ); # '.svn' ÍXLbv - next if( $path =~ /^.\.chm$/ ); # '*.chm' ÍXLbv - + next if( $path =~ /^.\.chm$/ ); # '*.chm' ÍXLbv + my $full_path = "$top_dir" . '/' . "$path"; - - if( -d "$top_dir/$path" ){ #-- fBNgÌêÍ©ª©gðÄÑo· + + if( -d "$top_dir/$path" ){ #-- fBNgÌêÍ©ª©gðÄÑo· if (&get_file_paths("$full_path", $chmupdated)) { return 1; } @@ -49,16 +49,16 @@ if (&check_file($full_path, $chmupdated)) { return 1; } - } - } - return 0; -} + } + } + return 0; +} sub check_file { my($filename, $chmupdated) = @_; my(@filestat) = stat $filename; - if ($filestat[8] > $chmupdated) { + if ($filestat[9] > $chmupdated) { return 1; } return 0;