#!/bin/bash
tl=`pwd`
for category in `find * -type d -maxdepth 0 | grep -v CVS`; do
echo $category >>packages.txt
for pkg in `ls $category | sort`; do
cd $tl/$category/$pkg
if [ -f PKGBUILD ]; then
. PKGBUILD
cd $tl
echo " $pkgname $pkgver" >>packages.txt
fi
done
cd $tl
echo "" >>packages.txt
done