searchall: filter out "Index of"

"Index of" pages do not contain list of files, only list of packages.
This commit is contained in:
Steven Penny 2014-06-09 07:13:53 -05:00
parent 29cd84482b
commit b11ab2daa5
1 changed files with 3 additions and 3 deletions

View File

@ -338,12 +338,12 @@ proxy () {
}
apt-searchall () {
local api nof
local api nof ste
api=ajax.googleapis.com/ajax/services/search/web
ste=cygwin.com/cygwin/packages
for pkg in "${packages[@]}"
do
printf \
-v qs 'v=1.0&rsz=8&q="%s"+site:cygwin.com/cygwin/packages/%s' $pkg $ARCH
printf -v qs 'v=1.0&rsz=8&q="%s"+-"index of"+site:%s/%s' $pkg $ste $ARCH
(( nof++ )) && echo
echo getting pages . . .
proxy "$api?$qs"