Fix calculation of latest version
[darcs-mirror-hpvt.git] / runhpvt.sh
1 #!/bin/bash
2
3 set -e
4
5 cd $(dirname $0)
6 wget -q http://hackage.haskell.org/packages/archive/00-index.tar.gz -O 00-index.tar.gz
7
8 wget -q http://ftp.debian.org/debian/dists/unstable/main/source/Sources.xz -O - | xzcat > Sources.unstable
9 wget -q http://ftp.debian.org/debian/dists/squeeze/main/source/Sources.bz2 -O - | bunzip2 > Sources.squeeze
10 wget -q http://ftp.debian.org/debian/dists/wheezy/main/source/Sources.bz2 -O - | bunzip2 > Sources.wheezy
11 wget -q http://ftp.debian.org/debian/dists/jessie/main/source/Sources.xz -O - | xzcat > Sources.jessie
12 wget -q http://ftp.debian.org/debian/dists/experimental/main/source/Sources.xz -O - | xzcat > Sources.experimental
13
14 #wget -q http://code.galois.com/darcs/haskell-platform/haskell-platform.cabal -O - > haskell-platform-darcs.cabal
15 #wget -q http://code.haskell.org/haskell-platform/haskell-platform.cabal -O - > haskell-platform-darcs.cabal
16 wget --no-check-certificate -q https://raw.github.com/haskell/haskell-platform/pre-release/haskell-platform.cabal -O haskell-platform-darcs.cabal
17 #wget -q http://hackage.haskell.org/platform/2010.1.0.0/haskell-platform.cabal -O -  > haskell-platform-2010.1.0.0.cabal
18 #wget -q http://lambda.haskell.org/platform/download/2012.2.0.0/haskell-platform-2012.2.0.0.tar.gz -O - | tar zOxf - haskell-platform-2012.2.0.0/packages/haskell-platform-2012.2.0.0/haskell-platform.cabal > haskell-platform-2012.2.0.0.cabal
19
20 if [ $(hostname) = ravel ]
21 then
22         export GCONV_PATH=/usr/lib/gconv
23 fi
24
25 ./hpvt >/dev/null
26 mv output.html public_html/hackagevsdebian.html
27 mv platform.html public_html/platform.html
28 curl --digest --netrc-file hackage-netrec --show-error --silent -X PUT -H "Content-type: text/csv" --data-binary '@cabalDebianMap.txt' http://hackage.haskell.org/distro/Debian/packages | grep -q Ok
29 # mv cabalDebianMap.txt public_html/cabalDebianMap.txt