summaryrefslogtreecommitdiffstats
path: root/db-unstable
blob: 18554c0ba043fd4645e8e85a3f67158ea84b616c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# $Id: db-unstable,v 1.5 2003/05/25 23:50:02 judd Exp $

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

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

echo "==> Generating Pacman Database for UNSTABLE..." >&2
cd $TMPDIR
CVS_RSH=ssh CVSROOT=:ext:cvs.archlinux.org:/home/cvs-unstable cvs -q export -r CURRENT unstable
/usr/bin/gensync $TMPDIR/unstable $TMPDIR/unstable.db.tar.gz
[ -f $TMPDIR/unstable.db.tar.gz ] && mv -f $TMPDIR/unstable.db.tar.gz /home/ftp/unstable

cd $TMPDIR/unstable && /arch/pkgdb 3

rm -rf $TMPDIR