get-w-b-db 1.4 KB
Newer Older
1 2
#!/bin/bash

J
Joerg Jaspert 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Copyright (C) 2008 Joachim Breitner <nomeata@debian.org>
# Copyright (C) 2011 Joerg Jaspert <joerg@debian.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; version 2.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

# exit on errors
J
Joerg Jaspert 已提交
20
set -e
J
Joerg Jaspert 已提交
21 22 23 24 25 26
# make sure to only use defined variables
set -u
# ERR traps should be inherited from functions too. (And command
# substitutions and subshells and whatnot, but for us the functions is
# the important part here)
set -E
J
Joerg Jaspert 已提交
27

J
Joerg Jaspert 已提交
28 29 30
# import the general variable set.
export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
. $SCRIPTVARS
31 32 33

# For debugging, you can override the path using
# the WB_DB_DIR enviroment variable
34
WB_DB_DIR=${WB_DB_DIR:-${scriptdir}/nfu}
35

J
Joerg Jaspert 已提交
36
for arch in $(dak admin s-a list-arch unstable); do
A
Ansgar Burchardt 已提交
37
    wget -q https://buildd.debian.org/stats/$arch-all.txt -O ${WB_DB_DIR}/${arch}-all.txt || echo "No w-b dump for ${arch}"
38
done