]> git.donarmstrong.com Git - neurodebian.git/blob - tools/nd_fetch_bdepends
Also for stats report which repo and which job number use our setup
[neurodebian.git] / tools / nd_fetch_bdepends
1 #!/bin/bash
2
3 dist=$1
4 tdir=$2
5
6 shift
7 shift
8
9 # provide deb-src by uncommenting
10 echo "D: adjusting the sources"
11 sed -i -e 's,^#deb-src,deb-src,g' /etc/apt/sources.list
12 echo "D: now have"
13 cat /etc/apt/sources.list
14
15 mkdir -p $tdir
16 cd $tdir
17 apt-get update
18 apt-get install -y devscripts dctrl-tools
19 rm -f build-rdeps.output
20 echo "D: querying rdepds for $@"
21
22 # D: interactive shell for debugging
23 # /bin/bash < /dev/tty > /dev/tty 2> /dev/tty
24
25 for pkg in "$@"; do
26         build-rdeps --distribution $dist $pkg >> build-rdeps.output
27 done
28
29 echo "D: got rdepds:"
30 cat build-rdeps.output
31
32 # Fetch all the sources
33 grep -v -e '^[-A-Z]' -e '^ *$' build-rdeps.output \
34         | sort | uniq \
35         | tee build-rdeps.list \
36         | while read pkg; do
37         apt-get source --download-only $pkg
38 done