diff --git a/autodist-upstream-updates b/autodist-upstream-updates index 995a1ff..05a9986 100755 --- a/autodist-upstream-updates +++ b/autodist-upstream-updates @@ -175,26 +175,23 @@ tail -n+2 $BUILDS_FILE > $buildstmp # parse Arch Linux package list [ "$quiet" ] || echo -n "Parsing Arch Linux packages list..." >&2 -for page in `seq 1 45`; do - SOURCEURL="https://www.archlinux.org/packages/?page=$page&sort=-last_update&q=&arch=i686&maintainer=&flagged=" +#for page in `seq 1 45`; do +for rep in core community extra; do +# SOURCEURL="https://www.archlinux.org/packages/?page=$page&sort=-last_update&q=&arch=i686&maintainer=&flagged=" + SOURCEURL="http://lug.mtu.edu/archlinux/$rep/os/i686/" curl -s "$SOURCEURL" | \ - grep "View package details" | \ + grep ".pkg." | grep -v ".sig\"" | \ while read line; do - line=`echo $line | html2text -nobs` -echo $line - set -- $line - pkg=$3 - ver=${4/-*} - ver=${ver/*:} + line=`echo $line | sed "s|.*href=\"\([^\"]*\)\">.*|\1|"` + pkg=`echo $line | sed "s|\(.*\)-[^-]*-[^-]*-[^-]*|\1|"` + ver=`echo $line | sed "s|.*-\([^-]*\)-[^-]*-[^-]*|\1|"` alias=`grep "^$pkg" $ALIASES_DB` [ "$alias" ] || alias=`grep "^lib$pkg " $ALIASES_DB` [ "$alias" ] && pkg=$alias line=`grep -i "^$pkg:" $buildstmp || grep -i "^lib$pkg:" $buildstmp || grep -i " $pkg[^-_A-Za-z0-9]" $buildstmp` if [ "$line" ]; then pkg=${line/:*} -echo "$pkg" [ "$pkg" -a "$ver" ] && { -echo "$pkg $ver $SOURCEURL ${alias/* /}" echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile } fi