diff options
Diffstat (limited to 'examples/rebuild/getlist')
-rwxr-xr-x | examples/rebuild/getlist | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/rebuild/getlist b/examples/rebuild/getlist new file mode 100755 index 0000000..caf9c5f --- /dev/null +++ b/examples/rebuild/getlist @@ -0,0 +1,21 @@ +#!/bin/sh + +DIST=$1 + +BUILD_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH) +MIRROR=http://ftp.at.debian.org + +if [ -z $DIST ]; then + echo "No distribution given." + exit 1 +fi + +wget -q ${MIRROR}/debian/dists/$DIST/main/source/Sources.gz -O Sources.main.gz +wget -q ${MIRROR}/debian/dists/$DIST/contrib/source/Sources.gz -O Sources.contrib.gz +zcat Sources.main.gz Sources.contrib.gz > Sources + +grep -E "^Package|^Architecture|^$" Sources | paste -s -d "=" | sed "s/==/\n/g" | sed "s/=/ /g" | cut -d " " -f 2,4- > list.$DIST +grep -E " all| any| $BUILD_ARCH" list.$DIST | cut -d " " -f 1 > list.$DIST.$BUILD_ARCH + +rm -f Sources.main.gz Sources.contrib.gz + |