diff options
author | Judd Vinet <judd@archlinux.org> | 2003-05-26 01:50:02 +0200 |
---|---|---|
committer | Judd Vinet <judd@archlinux.org> | 2003-05-26 01:50:02 +0200 |
commit | a1b1d65283834f9108e33b5a4e2945f8259f9d5a (patch) | |
tree | dd9987a364c2fb16b6304e955737c3f4973ed779 /db-unstable | |
parent | 3d078d5f874b5410267cc6beb73349ffeffce42c (diff) | |
download | dbscripts-a1b1d65283834f9108e33b5a4e2945f8259f9d5a.tar.gz dbscripts-a1b1d65283834f9108e33b5a4e2945f8259f9d5a.tar.xz |
improved arch db scripts
Diffstat (limited to 'db-unstable')
-rwxr-xr-x | db-unstable | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/db-unstable b/db-unstable index 8fa0388..18554c0 100755 --- a/db-unstable +++ b/db-unstable @@ -1,13 +1,23 @@ #!/bin/bash -# $Id: db-unstable,v 1.4 2003/05/24 00:25:59 judd Exp $ +# $Id: db-unstable,v 1.5 2003/05/25 23:50:02 judd Exp $ -echo "==> Generating pacsync2 Database for UNSTABLE..." >&2 -cd /tmp +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 /tmp/unstable /tmp/unstable.db.tar.gz -[ -f /tmp/unstable.db.tar.gz ] && mv -f /tmp/unstable.db.tar.gz /home/ftp/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 /tmp/unstable && /arch/pkgdb 3 +cd $TMPDIR/unstable && /arch/pkgdb 3 -rm -rf /tmp/unstable +rm -rf $TMPDIR |