Commit 81339a31 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgp: add http source support for multi letter dirs

parent 1657d59b
......@@ -82,18 +82,31 @@ get_list()
get_git_list $SYS $URL $LIST
return
fi
echo "Get list for $SYS from $URL"
#echo -e -n "\r"
echo "Get list for $SYS from $URL ..."
#curl -l $URL/ >$LIST
touch $LIST
# suitable for ftp and http lists
$CURL -s -l $URL/ | tee $LIST.tmp | html_filter >$LIST
rm -f $LIST.failed
( $CURL -s -l $URL/ || touch $LIST.failed ) | tee $LIST.tmp | html_filter >$LIST
if [ -e $LIST.failed ] ; then
#echo -e -n "\r"
warning "Could't download list for $SYS from $URL"
#rm -f "$LIST.tmp"
return
fi
# check if there is letter subdirs (Fedora)
for i in $(cat $LIST.tmp) ; do
for i in $(cat $LIST.tmp | sed -e "s|<a href=\"||g" -e "s|/\">.*||g") ; do
rhas "$i" rpm && break
# ignore more than one letter
[ -n "$(echo $i | cut -c2-)" ] && continue
echo "Try get $URL/$i"
[ "$i" = "-" ] && continue
#echo -e -n "\r"
echo "Try get $URL/$i ..."
$CURL -s -l $URL/$i/ | html_filter | sed -e "s|^|$i/|g" >>$LIST
done
rm -f $LIST.tmp
#echo
#else
# echo "List for $SYS"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment