diff options
| author | uakci <uakci@uakci.pl> | 2022-03-15 19:13:44 +0100 |
|---|---|---|
| committer | uakci <uakci@uakci.pl> | 2022-03-15 19:13:44 +0100 |
| commit | ddbbfedf15e970c02e128294890adbeb97c4a5ae (patch) | |
| tree | 06fa6f3efc124b2a9a5000c0c02dee36fd4c2d33 /crawl.sh | |
| download | mirror-main.tar.gz mirror-main.zip | |
Diffstat (limited to '')
| -rwxr-xr-x | crawl.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl.sh b/crawl.sh new file mode 100755 index 0000000..dee87c6 --- /dev/null +++ b/crawl.sh @@ -0,0 +1,19 @@ +set -e; shopt -s globstar nullglob +while read -r name offset base; do + [[ "$base" ]] && wget2 "$base" \ + --mirror \ + --page-requisites \ + --no-host-directories \ + --directory-prefix="$name" \ + --cut-dirs=$offset \ + --cut-url-get-vars \ + --cut-file-get-vars \ + --no-check-certificate \ + --local-encoding=utf-8 \ + "$@" \ + | tee "$name.crawl.$(date -uIs).log" + + for f in **/*.orig; do + mv "$f" "${f%%.orig}" + done +done |
