4 date_default_timezone_set( "GMT" );
5 $date = date( "Y-m-d H:i:s" );
9 $report = "http://wiki.linuxfromscratch.org/blfs/report/1";
10 $file = "/tmp/report.html";
12 system( "wget $report -q -O $file" );
14 $contents = file_get_contents( $file );
15 $c = strip_tags( $contents );
17 $a = explode( "\n", $c );
24 foreach ( $a as $line )
27 if ( preg_match( "/#/", $line ) )
29 $t = preg_replace( "/^.*(#\d+).*$/", "$1", $line );
32 array_push( $ticket, $t );
33 array_push( $desc, trim($summary) );
41 // HTML_DIR environment variable -- where to put html output
42 $d = getenv( 'HTML_DIR' );
43 $HTML_DIR = ($d) ?
$d : '.';
45 exec( "grep '\*' $HTML_DIR/chapter*.html", $diff );
46 $d = implode( "\n", $diff );
48 $file = preg_replace( "/<\/td><td>/" , " " , $d );
49 $file = preg_replace( "/chapter(\d)\./", "chapter0$1.", $file );
50 $file = preg_replace( "/\*/" , " *" , $file );
51 $file = preg_replace( "/\.html/" , "" , $file );
52 $file = preg_replace( "/:/" , " " , $file );
53 $file = preg_replace( "/\/home.*chapter/" , "" , $file );
55 $f = strip_tags( $file );
56 $a = explode( "\n", $f );
59 $msg = " BLFS Package BLFS Version Latest Ticket\n";
63 $c = preg_split( "/ /", $l );
64 if ( $c[0] == "" ) continue;
67 if ( preg_match( "/libreoffice-/", $pkg ) ) continue;
69 if ( $pkg == "baloo" ||
70 $pkg == "baloo-widgets" ||
71 $pkg == "kactivities" ||
72 $pkg == "kfilemetadata" ||
73 $pkg == "kdeplasma-addons" ||
77 $pkg == "oxygen-icons" ||
78 $pkg == "kde-base-artwork" ||
79 $pkg == "kde-baseapps" ||
80 $pkg == "kdepimlibs" ||
81 $pkg == "obconf-qt" ||
82 $pkg == "libdbusmenu-qt" ||
88 //$pkg == "firefox" ||
90 if ( $c[3] == "0" ) $c[3] .= " ";
91 $x = substr("chapter $c[0]: $c[1] ", 0, 32);
92 $x .= substr("$c[2] ", 0, 25);
93 $x .= substr("$c[3] ", 0, 13);
97 for ( $i=0; $i<count($ticket); $i++
)
99 $pkg = preg_replace( "/\+/", ".", $pkg );
100 // Matching as follows:
101 // "$pkg-Version", "$pkg " (whitespace), "$pkg," (comma), "$pkg" (only at end of the line)
102 if ( preg_match( "/$pkg(-[0-9]|,|\s|$)/i", $desc[$i] ) )
104 // Make sure cmake != cmake-extra-modules
105 if ( $pkg == "cmake" &&
106 preg_match( "/extra/", $desc[$i] )
119 //echo $msg; // For debugging
122 $from = "bdubbs@linuxfromscratch.org";
123 $subject = "BLFS Package Currency Check - $date GMT";
124 $to = "blfs-book@lists.linuxfromscratch.org";
126 exec ( "echo '$msg' | mailx -r $from -s '$subject' $to" );