File: plplot_miscdebris_wiki_backup.sh

package info (click to toggle)
plplot 5.14.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 30,424 kB
  • sloc: ansic: 79,613; xml: 28,583; cpp: 20,037; ada: 19,456; tcl: 12,081; f90: 11,423; ml: 7,276; java: 6,863; python: 6,792; sh: 3,185; perl: 828; lisp: 75; makefile: 48; sed: 33; fortran: 5
file content (32 lines) | stat: -rwxr-xr-x 1,178 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# backup http://www.miscdebris.net/plplot_wiki to a tarball.

# Directory where results are temporarily stored.  This directory is
# destroyed both at the start and at the end.  Also the tarball
# $DIR.tar.gz is overwritten.  So be careful what you
# specify here.
DIR=plplot_wiki

rm -rf $DIR
# Need to create the directory first if logging to a file in it.
mkdir  $DIR

# Recurse up to 5 levels deep, don't get any html above
# plplot_wiki, get the files necessary to display all pages,
# Do not download *.tar.gz files (because these plplot tarballs are
# huge and dated),
# convert links to the locally downloaded version, windows==> escape a long
# list of characters (including question mark) from file names,
# start local hierarchy at $DIR, and keep a log of the transaction in
# $DIR/plplot_wiki_backup.log
wget --recursive --level=5 --no-parent \
--page-requisites --convert-links \
--restrict-file-names=windows \
--reject='*.tar.gz' \
--no-host-directories --cut-dirs=1 \
--directory-prefix=$DIR \
-o $DIR/plplot_wiki_backup.log \
http://www.miscdebris.net/plplot_wiki
# Create tarball and remove directory tree result
tar zcf $DIR.tar.gz $DIR
rm -rf $DIR