1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/bin/sh
# Copyright (C) 2007 Osamu Aoki <osamu@debian.org>
#
# This is free software with ABSOLUTELY NO WARRANTY.
#
# You can redistribute it and/or modify it under the terms of
# the GNU General Public License version 2 or later.
#
set -e
#<xsl:variable name="uletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !#$%()=-~^|\/+*,.?;:@`"'&><</xsl:variable>
#<xsl:variable name="lletters">abcdefghijklmnopqrstuvwxyzabcdefghij</xsl:variable>
packages=$1
while read X ; do
echo "process: $X" >&2
PKG=$(echo $X |tr "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" "abcdefghijklmnopqrstuvwxyzabcdefghij"| \
tr -d " \!#\$%()=\-~^|\\/+*,.?;:@\`\"'&><")
case $X in
linux-tree-2.6.*) PKG=linuxtreecg ;;
esac
if SIZE=$(grep-dctrl -e -n --field=Package --show-field=Installed-Size \
--pattern="^$(echo $X|sed -e 's/\+/\\+/g')\$" $packages ) ; then
echo "<!ENTITY size-$PKG \"$SIZE\">"
else
echo "<!ENTITY size-$PKG \"NOT_FOUND\">"
echo "" >&2
echo "... ERROR ...: $X, probablly a removed or non-amd64 package." >&2
echo ".............: See http://packages.qa.debian.org/common/index.html" >&2
fi
done
echo $0 done >&2
#
#
# vim: set sts=2 ai expandtab:
|