autodist-upstream-updates: get archlinux packages list from mirror directory listings
This commit is contained in:
parent
ac6f81462a
commit
2674eed1f2
@ -175,26 +175,23 @@ tail -n+2 $BUILDS_FILE > $buildstmp
|
|||||||
|
|
||||||
# parse Arch Linux package list
|
# parse Arch Linux package list
|
||||||
[ "$quiet" ] || echo -n "Parsing Arch Linux packages list..." >&2
|
[ "$quiet" ] || echo -n "Parsing Arch Linux packages list..." >&2
|
||||||
for page in `seq 1 45`; do
|
#for page in `seq 1 45`; do
|
||||||
SOURCEURL="https://www.archlinux.org/packages/?page=$page&sort=-last_update&q=&arch=i686&maintainer=&flagged="
|
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" | \
|
curl -s "$SOURCEURL" | \
|
||||||
grep "View package details" | \
|
grep ".pkg." | grep -v ".sig\"" | \
|
||||||
while read line; do
|
while read line; do
|
||||||
line=`echo $line | html2text -nobs`
|
line=`echo $line | sed "s|.*href=\"\([^\"]*\)\">.*|\1|"`
|
||||||
echo $line
|
pkg=`echo $line | sed "s|\(.*\)-[^-]*-[^-]*-[^-]*|\1|"`
|
||||||
set -- $line
|
ver=`echo $line | sed "s|.*-\([^-]*\)-[^-]*-[^-]*|\1|"`
|
||||||
pkg=$3
|
|
||||||
ver=${4/-*}
|
|
||||||
ver=${ver/*:}
|
|
||||||
alias=`grep "^$pkg" $ALIASES_DB`
|
alias=`grep "^$pkg" $ALIASES_DB`
|
||||||
[ "$alias" ] || alias=`grep "^lib$pkg " $ALIASES_DB`
|
[ "$alias" ] || alias=`grep "^lib$pkg " $ALIASES_DB`
|
||||||
[ "$alias" ] && pkg=$alias
|
[ "$alias" ] && pkg=$alias
|
||||||
line=`grep -i "^$pkg:" $buildstmp || grep -i "^lib$pkg:" $buildstmp || grep -i " $pkg[^-_A-Za-z0-9]" $buildstmp`
|
line=`grep -i "^$pkg:" $buildstmp || grep -i "^lib$pkg:" $buildstmp || grep -i " $pkg[^-_A-Za-z0-9]" $buildstmp`
|
||||||
if [ "$line" ]; then
|
if [ "$line" ]; then
|
||||||
pkg=${line/:*}
|
pkg=${line/:*}
|
||||||
echo "$pkg"
|
|
||||||
[ "$pkg" -a "$ver" ] && {
|
[ "$pkg" -a "$ver" ] && {
|
||||||
echo "$pkg $ver $SOURCEURL ${alias/* /}"
|
|
||||||
echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile
|
echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user