view make/mirror.py @ 107:dde34eaf03ed

Add 2010 OLS papers.
author Rob Landley <rob@landley.net>
date Sun, 12 Dec 2010 16:49:15 -0600
parents 7bcba6e2acc3
children a5cfece4556a
line wrap: on
line source

#!/usr/bin/python

import os, sys, popen2

# Download stuff to populate mirror/

try: os.mkdir("mirror")
except: pass
os.chdir("mirror")

# Fetch mirrored files if we haven't already got them

for i in (["b6398cf2d5b3cc6e2bfe572adb856dd8dddb707a", "http://www.moses.uklinux.net/patches/lki-single.html"],
          ["08727c048f443926adadb9bf86248e71eab3cbf9", "http://www.moses.uklinux.net/patches/lki.pdf"],
          ["de58dfc537e24d5e0b7cbf50666e50efafe996e7", "http://www.linux.org.uk/~ajh/ols2002_proceedings.pdf.gz","ols2002.pdf.gz"],
          ["1e7c6f9fd7722805bcba78ea4afa57ceea87e16c", "http://web.archive.org/web/20031002044046/http://archive.linuxsymposium.org/ols2003/Proceedings/LinuxSymposium2003.pdf", "ols2003.pdf"],
          ["710e98915c0b6474cabf4dd27b3d80483cb14aac", "http://web.archive.org/web/20040910220019/http://www.finux.org/proceedings/LinuxSymposium2004_V1.pdf", "ols2004v1.pdf"],
          ["0e5ab31d392a7c03213c23c3ca84c8be37a0727d", "http://web.archive.org/web/20040910220019/http://www.finux.org/proceedings/LinuxSymposium2004_V2.pdf", "ols2004v2.pdf"],
          ["2abfcb9265191e64e9c22d3f6f9dc9404b27419e", "http://www.linuxsymposium.org/2005/linuxsymposium_procv1.pdf", "ols2005v1.pdf"],
          ["437a4c35c72667f9d35012546e0d5a4720693f3f", "http://www.linuxsymposium.org/2005/linuxsymposium_procv2.pdf", "ols2005v2.pdf"],
          ["355ac65470c38333b26d55b7c8493d93c419cd2e", "http://www.linuxsymposium.org/2006/linuxsymposium_procv1.pdf","ols2006v1.pdf"],
          ["ab250f4549b13b47425e0400ea7762f21eb01cde", "http://www.linuxsymposium.org/2006/linuxsymposium_procv2.pdf","ols2006v2.pdf"],
          ["765e049036ca947af05fb5b4f29b9daf4b363558", "https://ols2006.108.redhat.com/2007/Reprints/OLS2007-Proceedings-V1.pdf", "ols2007v1.pdf"],
          ["60fdaa6a74dec29a0538325b742bee4097247c6d", "https://ols2006.108.redhat.com/2007/Reprints/OLS2007-Proceedings-V2.pdf", "ols2007v2.pdf"],
          ["a31ac3ae1fffcd747ae37a2e667ec3bd695ede47", "http://www.linuxsymposium.org/2008/ols-2008-Proceedings-V1.pdf", "ols2008v1.pdf"],
          ["5132655a740f98c81ad159c20b5c12887ea3cf8a", "http://www.linuxsymposium.org/2008/ols-2008-Proceedings-V2.pdf", "ols2008v2.pdf"],
          ["f48e8682c14355df15567be2c95307485edb1587", "http://www.linuxsymposium.org/2009/ls-2009-proceedings.pdf", "ols2009.pdf"],
          ["6d643fee833b7cf1db33b53fa2a6d96a217a3170", "http://www.linuxsymposium.org/LS_2010_Proceedings_Draft.pdf", "ols2010.pdf"]
         ):
  file=i[1].split('/')[-1]
  if len(i)>2: file=i[2]
  print "check %s" % file
  if i[0]:
    sha1=popen2.Popen3('sha1sum %s' % file).fromchild.read().split()
    if sha1 and i[0] == sha1[0]:
      continue
  print "fetch %s" % i[1]
  if os.system('wget -O "%s" "%s"' % (file, i[1])):
    sys.stderr.write("wget failed\n")
    sys.exit(1)