blob: 0ff781883b2bae073f38b1c1a7fc9e3c4b2816e3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/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
|