Mercurial > hg > kdocs
comparison make/do-mirror.sh @ 81:6adf16f10d54
Split up make.sh so it's easier to call subsets of its functionality.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 23 Oct 2007 18:35:49 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
80:fa8bf02e7cfa | 81:6adf16f10d54 |
---|---|
1 #!/bin/bash | |
2 | |
3 # Mirror various documentation resources from out on the internet | |
4 | |
5 if [ -z "$WEBDIR" ] | |
6 then | |
7 echo set WEBDIR | |
8 exit 1 | |
9 fi | |
10 | |
11 cd "$WEBDIR" | |
12 make/mirror.py | |
13 cat mirror/ols2002.pdf.gz | gunzip > mirror/ols2002.pdf | |
14 if [ -z "$(find mirror/ols2001 -name "*.pdf")" ] | |
15 then | |
16 mkdir -p mirror/ols2001 && | |
17 cd mirror/ols2001 && | |
18 wget -r -l 1 -nd http://lwn.net/2001/features/OLS/pdf/pdf/ && | |
19 cd ../.. | |
20 | |
21 [ $? -ne 0 ] && exit 1 | |
22 fi | |
23 | |
24 if [ -z "$(find ols/2007 -name "*.pdf")" ] | |
25 then | |
26 echo "Split ols files" | |
27 mkdir -p ols/{1999,2000,2001,2002,2003,2004,2005,2006,2007} && | |
28 cp mirror/ols2001/*.pdf ols/2001 && | |
29 make/splitols.py mirror ols | |
30 [ $? -ne 0 ] && exit 1 | |
31 fi | |
32 |