File: plplot_wiki_backup.sh

package info (click to toggle)
plplot 5.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,280 kB
  • ctags: 13,512
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,210; makefile: 199; lisp: 75; sed: 25; fortran: 7
file content (29 lines) | stat: -rwxr-xr-x 1,071 bytes parent folder | download | duplicates (5)
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
#!/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,
# 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 \
--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