summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2002-11-28 09:28:13 +0100
committerJudd Vinet <judd@archlinux.org>2002-11-28 09:28:13 +0100
commit39101b32c119eb1508ca76ae30b7f36cd7d781fe (patch)
treef9cd2630815a32dd4d54fafaf20e486a1a7f2b40
parent8b3ecd497c4f514031e768913a345019bc763899 (diff)
downloaddbscripts-39101b32c119eb1508ca76ae30b7f36cd7d781fe.tar.gz
dbscripts-39101b32c119eb1508ca76ae30b7f36cd7d781fe.tar.xz
removed old gensyncdb script (used for pacsync)
replaced old genpkglist with a new one
-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
+