blob: 0ff781883b2bae073f38b1c1a7fc9e3c4b2816e3 (
plain) (
tree)
|
|
#!/bin/bash
rec_fetch() {
echo fetching $1
curl --no-progress-meter https://www.sco.com/developers/gabi/latest/$1 -o $1
# Handle following link tags:
# <a href=ch4.reloc.html>
# <a href=ch5.dynamic.html#pointer_note>
# <a href="ch4.sheader.html#sh_flags">
# <a href=#tag_encodings>
# <a href="#sh_type">
for page in $(grep href $1 |\
sed 's/.*href="\{0,1\}\([a-zA-Z._0-9]*\)"\{0,1\}[#>].*/\1/g' |\
sort | uniq); do
if [[ -z $page || -f $page || ${page##*.} != html ]]; then
continue;
fi
rec_fetch $page
done
}
rec_fetch contents.html
|