Mercurial > hg > kdocs
annotate make/mirror.py @ 104:7bcba6e2acc3
OLS papers are up to 2009 now.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 01 Jan 2010 04:54:13 -0600 |
parents | b1069151f74b |
children | dde34eaf03ed |
rev | line source |
---|---|
51
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/usr/bin/python |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 import os, sys, popen2 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 # Download stuff to populate mirror/ |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 try: os.mkdir("mirror") |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 except: pass |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 os.chdir("mirror") |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 # Fetch mirrored files if we haven't already got them |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 for i in (["b6398cf2d5b3cc6e2bfe572adb856dd8dddb707a", "http://www.moses.uklinux.net/patches/lki-single.html"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 ["08727c048f443926adadb9bf86248e71eab3cbf9", "http://www.moses.uklinux.net/patches/lki.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 ["de58dfc537e24d5e0b7cbf50666e50efafe996e7", "http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz","ols2002.pdf.gz"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 ["1e7c6f9fd7722805bcba78ea4afa57ceea87e16c", "http://web.archive.org/web/20031002044046/http://archive.linuxsymposium.org/ols2003/Proceedings/LinuxSymposium2003.pdf", "ols2003.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 ["710e98915c0b6474cabf4dd27b3d80483cb14aac", "http://web.archive.org/web/20040910220019/http://www.finux.org/proceedings/LinuxSymposium2004_V1.pdf", "ols2004v1.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 ["0e5ab31d392a7c03213c23c3ca84c8be37a0727d", "http://web.archive.org/web/20040910220019/http://www.finux.org/proceedings/LinuxSymposium2004_V2.pdf", "ols2004v2.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 ["2abfcb9265191e64e9c22d3f6f9dc9404b27419e", "http://www.linuxsymposium.org/2005/linuxsymposium_procv1.pdf", "ols2005v1.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 ["437a4c35c72667f9d35012546e0d5a4720693f3f", "http://www.linuxsymposium.org/2005/linuxsymposium_procv2.pdf", "ols2005v2.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 ["355ac65470c38333b26d55b7c8493d93c419cd2e", "http://www.linuxsymposium.org/2006/linuxsymposium_procv1.pdf","ols2006v1.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 ["ab250f4549b13b47425e0400ea7762f21eb01cde", "http://www.linuxsymposium.org/2006/linuxsymposium_procv2.pdf","ols2006v2.pdf"], |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 ["765e049036ca947af05fb5b4f29b9daf4b363558", "https://ols2006.108.redhat.com/2007/Reprints/OLS2007-Proceedings-V1.pdf", "ols2007v1.pdf"], |
97
b1069151f74b
Add and split up OLS 2008 papers.
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
24 ["60fdaa6a74dec29a0538325b742bee4097247c6d", "https://ols2006.108.redhat.com/2007/Reprints/OLS2007-Proceedings-V2.pdf", "ols2007v2.pdf"], |
b1069151f74b
Add and split up OLS 2008 papers.
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
25 ["a31ac3ae1fffcd747ae37a2e667ec3bd695ede47", "http://www.linuxsymposium.org/2008/ols-2008-Proceedings-V1.pdf", "ols2008v1.pdf"], |
104
7bcba6e2acc3
OLS papers are up to 2009 now.
Rob Landley <rob@landley.net>
parents:
97
diff
changeset
|
26 ["5132655a740f98c81ad159c20b5c12887ea3cf8a", "http://www.linuxsymposium.org/2008/ols-2008-Proceedings-V2.pdf", "ols2008v2.pdf"], |
7bcba6e2acc3
OLS papers are up to 2009 now.
Rob Landley <rob@landley.net>
parents:
97
diff
changeset
|
27 ["f48e8682c14355df15567be2c95307485edb1587", "http://www.linuxsymposium.org/2009/ls-2009-proceedings.pdf", "ols2009.pdf"] |
51
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
28 ): |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
29 file=i[1].split('/')[-1] |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
30 if len(i)>2: file=i[2] |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 print "check %s" % file |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 if i[0]: |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 sha1=popen2.Popen3('sha1sum %s' % file).fromchild.read().split() |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 if sha1 and i[0] == sha1[0]: |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 continue |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 print "fetch %s" % i[1] |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 if os.system('wget -O "%s" "%s"' % (file, i[1])): |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
38 sys.stderr.write("wget failed\n") |
93c68f362860
New script to download OLS files (and others), and split up volumes into
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
39 sys.exit(1) |