summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgenpkglist46
1 files changed, 24 insertions, 22 deletions
diff --git a/genpkglist b/genpkglist
index 94a9336..67f384e 100755
--- a/genpkglist
+++ b/genpkglist
@@ -1,28 +1,30 @@
#!/bin/bash
-# $Id: genpkglist,v 1.4 2002/06/26 18:59:49 judd Exp $
+# $Id: genpkglist,v 1.5 2002/11/28 08:28:13 judd Exp $
-tl=`pwd`
+#
+# genpkglist
+#
+# Generates a text package database for use with the setup script
+#
-cat >packages.txt <<_EOF
-<table>
- <tr>
- <th>Package</th>
- <th>Version</th>
- <th>Collection</th>
- <th>Description</th>
- </tr>
-_EOF
+pkgfile="`pwd`/packages.txt"
+cd /usr/abs
+rm -f $pkgfile
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
+ 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
+