1 #####################################################################
3 # ????????????????????X????
5 #####################################################################
12 if($date eq "" || !($date =~ /^[1-2][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9]$/)){
22 print "$dir????????????B\n";
26 print "$dir.zip??????B\n";
32 &search_dir($date,".",$dir);
36 print "??t??????????\n";
37 system("zip $dir.zip -r $dir");
42 #====================================================================
44 #====================================================================
46 print "????????????????????A????????????\n";
48 print "perl update.pl YYYY-MM-DD [???f??????]\n";
49 print " ?????????????Y???????????
\8e¦???????B\n";
52 #====================================================================
54 #====================================================================
62 while(my $entry = readdir(DIR)){
63 if(index($entry,".")!=0 && $entry ne "CVS"){
64 if($dir eq "." && ($entry eq "log" || $entry eq "backup" || $entry eq "attach" || $entry eq "pdf")){
66 } elsif($dir eq "./data" && $entry ne "FrontPage" && $entry ne "Help"){
70 push(@list,"$dir/$entry");
76 foreach my $entry (@list){
78 &search_dir($date,$entry,$to);
81 my @status = stat($entry);
82 my ($sec,$min,$hour,$mday,$mon,$year)=localtime($status[9]);
83 my $date_str = sprintf("%04d%02d%02d",$year+1900,$mon+1,$mday);
85 if(int($date_str) >= $date){
87 # ?????????????????????????
92 my $copydir = "$to$path";
94 mkpath($copydir) or die "$copydir????
\8e¸??????";
98 $name =~ s/^(.*?\/)*//g;
99 copy($entry,"$copydir/$name") or die "$copydir/$name?????
\8e¸??????";