#!/bin/sh

# Script to find and print out all usages of "it's" in the Packages file,
# so we can check whether or not they are correct.

BASEURL=ftp://ftp.debian.org/debian/dists/sid

for section in main contrib non-free ; do
	wget -O packages.${section}.bz2 \
		${BASEURL}/${section}/binary-i386/Packages.bz2
	bunzip2 packages.${section}.bz2
done

cat packages.main packages.contrib packages.non-free > packages

grep-available -F Description -e "[[:space:]][Ii]t's($|[[:space:]])" packages \
	| egrep -C 1 "(^Package: |[Ii]t's)" | egrep '^( |Package)'
# -C 1 here ----^^^^ to get enough context around use of "it's"
