summaryrefslogtreecommitdiff
path: root/genpkglist
blob: 67f384e2ae22b968704adafa025e15e966160ef3 (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
#!/bin/bash
# $Id: genpkglist,v 1.5 2002/11/28 08:28:13 judd Exp $

#
# genpkglist
#
# Generates a text package database for use with the setup script
#

pkgfile="`pwd`/packages.txt"

cd /usr/abs
rm -f $pkgfile
for category in `find * -type d -maxdepth 0 | grep -v CVS`; do
	cd $category
	for pkg in `/bin/ls`; do
		cd $pkg
		if [ -f PKGBUILD ]; then
			. PKGBUILD
			if [ -f /home/ftp/current/$pkgname-$pkgver-$pkgrel.pkg.tar.gz ]; then
				echo "$category/$pkgname-$pkgver-$pkgrel.pkg.tar.gz" >>$pkgfile
			else
				echo "notice: Missing $pkgname-$pkgver-$pkgrel.pkg.tar.gz in ftp site" >&2
			fi
		fi
		cd ..
	done
	cd ..
done