Changeset 1552


Ignore:
Timestamp:
06/29/07 18:27:53 (7 years ago)
Author:
alanbach-guest
Message:

many fixes for the watch system

Location:
scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/watch.php

    r1551 r1552  
    44// Based on Debian DEHS http://svn.debian.org/wsvn/dehs 
    55 
    6 $path=$_GET["path"]; 
    7 $archs=$_GET["archs"]; 
    8 uscan($path); 
     6$vars=$_GET["vars"]; 
     7uscan($vars); 
    98 
    109// Display warnings? 
    1110$show_warnings=false; 
    1211 
    13 function uscan($path){ 
     12function uscan($vars){ 
     13        $arrvars=explode("*", $vars); 
     14        $path = $arrvars[0]; 
     15 
     16        $arrarchs=explode("-", $arrvars[1]); 
     17        $archs="<font color=red>".$arrarchs[0]."</font>&nbsp;&nbsp;<font color=green>".$arrarchs[1]."</font>&nbsp;&nbsp;<font color=blue>".$arrarchs[2]."</font>"; 
     18 
    1419        $uscan_res=shell_exec("/usr/bin/uscan --report --dehs --check-dirname-level 0 ".$path); 
     20 
     21        # work around the plus bug 
     22        $uscan_res=str_replace("+", "*", $uscan_res);  
    1523        $p = xml_parser_create(); 
    1624        xml_parse_into_struct($p, $uscan_res, $vals, $index); 
     
    4957        if($pkg !='' || $pkg !=null){ 
    5058                if($upstream != null){ 
    51                         echo "<tr bgcolor=white><td><b>".$pkg."</b></td><td><a href=".$up_url.">".$upstream."</a></td><td><font color=".$color.">".$parsix."</font></td><td>".$archs."</td><td bgcolor=".$bk_color.">".$status."</td></tr>"; 
     59                        echo "<tr bgcolor=white><td><b>".$pkg."</b></td><td><a href=".$up_url.">".$upstream."</a></td><td><font color=".$color.">".$parsix."</font></td><td align=center>".$archs."</td><td bgcolor=".$bk_color.">".$status."</td></tr>"; 
    5260                }else{ 
    5361                        if($show_warnings){ 
  • scripts/watch.sh

    r1551 r1552  
    77BASE_PATH="/home/parsix/public_html/watch" 
    88BASE_URL="http://watch.parsix.org" 
     9LOCAL_REPO="/home/parsix-pkg-repo" 
     10SVN_REPO="/svn/pkg-parsix/" 
    911 
    1012if [ -f $BASE_PATH/index.html ]; then 
     
    1820echo $HEADER > $BASE_PATH/index.html 
    1921 
    20 LIST=`find /svn/svn-parsix/ -name watch | grep debian | grep trunk | sort` 
     22LIST=`/usr/bin/find $SVN_REPO -name watch | /bin/grep debian | /bin/grep trunk | sort` 
    2123 
    2224for x in $LIST 
     25do 
    2326# ARCH Checks 
    24 $COUNT = `find ${x/%debian\/watch/} | grep -c amd64.deb` 
     27 
     28PKG=`basename ${x/%trunk\/debian\/watch/}` 
     29 
     30COUNT=`/usr/bin/find $LOCAL_REPO | /bin/grep $PKG | /bin/grep -c amd64.deb` 
    2531if [ $COUNT -ne 0 ]; then 
    26         $AMD64 = "amd64" 
     32        AMD64="amd64" 
     33else 
     34        AMD64="" 
    2735fi 
    2836 
    29 $COUNT = `find ${x/%debian\/watch/} | grep -c i386.deb` 
     37COUNT=`find $LOCAL_REPO | /bin/grep $PKG | /bin/grep -c i386.deb` 
    3038if [ $COUNT -ne 0 ]; then 
    31         $I386 = "i386" 
     39        I386="i386" 
     40else 
     41        I386="" 
    3242fi 
    3343 
    34 $COUNT = `find ${x/%debian\/watch/} | grep -c all.deb` 
     44COUNT=`find $LOCAL_REPO | /bin/grep $PKG | /bin/grep -c all.deb` 
    3545if [ $COUNT -ne 0 ]; then 
    36         $ALLARCH = "all" 
     46        ALLARCH="all" 
     47else 
     48        ALLARCH="" 
    3749fi 
    3850 
    39 ARCHS="$ALLARCH $I386 $AMD64" 
     51ARCHS="$ALLARCH-$I386-$AMD64" 
    4052 
    41 do lynx -source $BASE_URL/watch.php?path=${x/%debian\/watch/}&archs=$ARCHS | sed s/Debian/Parsix/g >> $BASE_PATH/index.html 
     53lynx -source $BASE_URL/watch.php?vars=${x/%debian\/watch/}*$ARCHS | sed s/Debian/Parsix/g >> $BASE_PATH/index.html 
    4254 
    4355done 
Note: See TracChangeset for help on using the changeset viewer.