source: svn/newcon3bcm2_21bu/BSEAV/api/build/find_latest_ccase_file.pl

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/usr/bin/perl
2
3#################################
4# DME: This perl script processes all header files for the
5# latest clearcase check in date/time. It prints the file
6# with the latest date/time. Ideally this should be bsettop.h because
7# any change to the public API requires that BSETTOP_VERSION be incremented.
8#################################
9
10use POSIX;
11
12$dirname = $ENV{"BSEAV"} . "/api/include";
13opendir(DIR, $dirname);
14@filelist = grep {/\.h$/} readdir(DIR);
15
16# find the highest clearcase modification time
17$maxtimeval = 0;
18$maxfile="none";
19
20foreach $file (@filelist) {
21    open FILE, "$dirname/$file";
22    read FILE,$_,1024;
23    ($filedate, $filetime) = /brcm_Log: \S+ \$\s \* \s \* \S+\s+(\S+) (\S+)/m;
24    $_ = "$filedate,$filetime";
25    if (/(.+)\/(.+)\/(.+),(.+):(.+)(\w)/) {
26        ($mm,$dd,$yyyy,$hh,$min,$am) = ($1,$2,$3,$4,$5,$6);
27    }
28    else {
29        next;
30    }
31
32    if ($am eq "p") {
33        $hh += 12;
34    }
35#   print "$mm,$dd,$yyyy,$hh,$min,$am\n";
36    $timeval = mktime(0,$min,$hh,$dd,$mm-1,$yyyy+2000-1900);
37#   print "$file = $_ = $timeval\n";
38
39    if (($file eq "bsettop.h" && $timeval == $maxtimeval) || $timeval > $maxtimeval) {
40        $maxtimeval = $timeval;
41        $maxfile = $file;
42    }
43}
44
45# Print the file with the last clearcase modification time
46print "$maxfile\n";
Note: See TracBrowser for help on using the repository browser.