#!/bin/bash

while read line; do
	line1=`echo $line | sed 's/,/ /g'`
	array=($line1)

	if [ "`echo ${array[1]} | sed 's/gnome-i18n//'`" != "${array[1]}" ]; then
		cmpdir="${array[1]}"
		podir=.
	else
		cmpdir="${array[0]}"
		podir=po
	fi

	cat << _EOF_
  <module name="${array[0]}">
    <version release="gnome-1.4-core">
      <component name="${array[0]}" dir="$cmpdir">
	<podir dir="$podir">
	<potname name="${array[2]}">
	<branch name="${array[3]}">
_EOF_

	if [ "${array[4]}" = "TRUE" ]; then
		echo -e "\t<regenerate/>"
	fi

	if [ "${array[5]}" = "TRUE" ]; then
		echo -e "\t<download/>"
	fi
	
	cat << _EOF_
      </component>
    </version>
  </module>
_EOF_

done
