diff options
author | Judd Vinet <judd@archlinux.org> | 2002-11-28 09:28:13 +0100 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2002-11-28 09:28:13 +0100 |
commit | 39101b32c119eb1508ca76ae30b7f36cd7d781fe (patch) | |
tree | f9cd2630815a32dd4d54fafaf20e486a1a7f2b40 /genpkglist | |
parent | 8b3ecd497c4f514031e768913a345019bc763899 (diff) | |
download | dbscripts-39101b32c119eb1508ca76ae30b7f36cd7d781fe.tar.gz dbscripts-39101b32c119eb1508ca76ae30b7f36cd7d781fe.tar.xz |
removed old gensyncdb script (used for pacsync)
replaced old genpkglist with a new one
Diffstat (limited to 'genpkglist')
-rwxr-xr-x | genpkglist | 46 |
1 files changed, 24 insertions, 22 deletions
@@ -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 + |