From 8ca26cbb43f8ff2b0b5a2c49d8e11a2f4dd54b79 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 18 Feb 2024 22:04:41 +0100 Subject: nginx: self-hosted freq used docs /pub/ --- .../memzero/pub/abi/sysv/sysv-gabi4-2013/.fetch.sh | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 roles/webserver/files/www/memzero/pub/abi/sysv/sysv-gabi4-2013/.fetch.sh (limited to 'roles/webserver/files/www/memzero/pub/abi/sysv') diff --git a/roles/webserver/files/www/memzero/pub/abi/sysv/sysv-gabi4-2013/.fetch.sh b/roles/webserver/files/www/memzero/pub/abi/sysv/sysv-gabi4-2013/.fetch.sh new file mode 100644 index 0000000..0ff7818 --- /dev/null +++ b/roles/webserver/files/www/memzero/pub/abi/sysv/sysv-gabi4-2013/.fetch.sh @@ -0,0 +1,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: + # + # + # + # + # + 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 -- cgit v1.2.3