Intergrated test scripts with automake
[gnucomo.git] / scripts / package-debian
1 #!/bin/sh
2 #
3 # Gnucomo package parameter report.
4 #
5 # Create a list of packages and patches on a Debian Linux system
6 # that can be read by the Gnucomo input program, gcm_input.
7
8
9
10 HOST=`hostname --fqdn`
11 TIME=`date`
12
13 echo "<?xml version='1.0'?>"
14 echo "<gcmt:message xmlns:gcmt='http://gnucomo.org/transport/'>"
15 echo "  <gcmt:header>"
16 echo "      <gcmt:messagetype>package list</gcmt:messagetype>"
17 echo "      <gcmt:hostname>$HOST</gcmt:hostname>"
18 echo "      <gcmt:time>$TIME</gcmt:time>"
19 echo "   </gcmt:header>"
20 echo "   <gcmt:data>"
21
22 echo "   <gcmt:parameters gcmt:class='package'>"
23
24 COLUMNS=180
25 export COLUMNS
26
27 dpkg -l | grep '^ii' | sed -e 's/&/&amp;/' | while read FLAGS PACKAGE VERSION DESCRIPTION
28 do
29       echo "<gcmt:parameter name='$PACKAGE'>"
30       echo "   <gcmt:description>$DESCRIPTION</gcmt:description>"
31       echo "   <gcmt:property name='version'>$VERSION</gcmt:property>"
32       echo "</gcmt:parameter>"
33 done
34
35
36 echo "    </gcmt:parameters>"
37 echo "   </gcmt:data>"
38 echo "</gcmt:message>"
39