]> git.decadent.org.uk Git - dak.git/blob - scripts/nfu/get-w-b-db
42e2c6ad48ba99af6b79a19534b177b2bb36299c
[dak.git] / scripts / nfu / get-w-b-db
1 #!/bin/bash
2
3 # Copyright (C) 2008 Joachim Breitner <nomeata@debian.org>
4 # Copyright (C) 2011 Joerg Jaspert <joerg@debian.org>
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation; version 2.
9 #
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 # exit on errors
20 set -e
21 # make sure to only use defined variables
22 set -u
23 # ERR traps should be inherited from functions too. (And command
24 # substitutions and subshells and whatnot, but for us the functions is
25 # the important part here)
26 set -E
27
28 # import the general variable set.
29 export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
30 . $SCRIPTVARS
31
32 # For debugging, you can override the path using
33 # the WB_DB_DIR enviroment variable
34 WB_DB_DIR=${WB_DB_DIR:-${scriptdir}/nfu}
35
36 for arch in $(dak admin s-a list-arch unstable); do
37     wget -q http://buildd.debian.org/stats/$arch-all.txt -O ${WB_DB_DIR}/${arch}-all.txt || echo "No w-b dump for ${arch}"
38 done