summaryrefslogtreecommitdiffstats
path: root/pkgdb1
blob: b32f0dbbc145d8fe7d8a24a232fb6538af71ebd8 (plain)
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
36
37
38
39
40
41
#!/bin/bash
# $Id: pkgdb1,v 1.2 2004/07/02 17:50:32 judd Exp $

tl=`pwd`

repoid=$1
if [ "$repoid" = "" ]; then
	me=`basename $0`
	echo "usage: $me <repoid>"
	exit 1
fi

cd $tl
for category in `find . -type d -maxdepth 1 | grep -v CVS | grep -v "^extra" | grep -v "^unstable"`; do
	category=`echo $category | sed 's|./||'`
	if [ "$category" = "." ]; then
		continue
	fi
	for pkg in `ls $category | sort`; do
		cd $tl/$category/$pkg
		if [ -f PKGBUILD ]; then
			unset depends source deplist sources
			unset pkgname pkgver pkgrel pkgdesc url
			. PKGBUILD
			deplist=${depends[@]}
			sources=${source[@]}
			echo $pkgname
			echo $pkgver
			echo $pkgrel
			echo $pkgdesc
			echo $category
			echo $url
			echo $sources
			echo $deplist
		fi
		cd $tl
	done
done

exit 0