summaryrefslogtreecommitdiffstats
path: root/db-arch
blob: 1e24f889c82ebf3a0abc79d8552c782acd99bfc9 (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
#!/bin/bash
# $Id: db-arch,v 1.8 2003/05/25 23:50:02 judd Exp $

uid=`id -u`
TMPDIR="/tmp/archpkg.$uid"

# RedHat's mktemp is broken...
if [ -d /tmp/archpkg.$uid ]; then
	echo "==> Removing old temp dir..." >&2
	rm -rf /tmp/archpkg.$uid || exit 1
fi
mkdir /tmp/archpkg.$uid; [ $? -gt 0 ] && exit 1

echo "==> Generating Pacman Database for OFFICIAL..." >&2
cd $TMPDIR
CVSROOT=:ext:judd@cvs.archlinux.org:/home/cvs-arch cvs -q export -r CURRENT -f arch/build
/usr/bin/gensync $TMPDIR/arch/build $TMPDIR/current.db.tar.gz
[ -f $TMPDIR/current.db.tar.gz ] && mv -f $TMPDIR/current.db.tar.gz /home/ftp/current

cd $TMPDIR/arch/build && /arch/pkgdb 1

echo "==> Generating Text Package List..." >&2
/arch/genpkglist
mv packages.txt /home/ftp/current/setup/packages.txt

rm -rf $TMPDIR