~ubuntu-china-devs/ubuntu-chinese/langpack-o-matic

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -e

# this is part of langpack-o-matic, by Martin Pitt <martin.pitt@canonical.com>
#
# (C) 2008 Canonical Ltd.
#
# Check which packages referenced in the support dependencies are not in main

[ "$1" ] || {
    echo "Usage: $0 <release>"
    exit 1
}

DIST="$1"
PKGS=$(grep -h -v '^ex:' support-depends/* |cut -f2 -d:|sort -u)
SRCS=http://archive.ubuntu.com/ubuntu/dists/$DIST/main/binary-i386/Packages.gz
MAIN=$(wget -q -O - $SRCS | gunzip | grep '^Package: ' | cut -f2- -d\ )

for p in $PKGS; do
    if ! echo "$MAIN" | grep -wq $p; then
        echo $p
    fi
done