Debian Codegraph @

examples/rebuild/getlist

raw symbols SCIP
1 #!/bin/sh
2
3 DIST=$1
4
5 BUILD_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
6 MIRROR=http://ftp.at.debian.org
7
8 if [ -z $DIST ]; then
9 echo "No distribution given."
10 exit 1
11 fi
12
13 wget -q ${MIRROR}/debian/dists/$DIST/main/source/Sources.gz -O Sources.main.gz
14 wget -q ${MIRROR}/debian/dists/$DIST/contrib/source/Sources.gz -O Sources.contrib.gz
15 zcat Sources.main.gz Sources.contrib.gz > Sources
16
17 grep -E "^Package|^Architecture|^$" Sources | paste -s -d "=" | sed "s/==/\n/g" | sed "s/=/ /g" | cut -d " " -f 2,4- > list.$DIST
18 grep -E " all| any| $BUILD_ARCH" list.$DIST | cut -d " " -f 1 > list.$DIST.$BUILD_ARCH
19
20 rm -f Sources.main.gz Sources.contrib.gz
21