diff options
-rwxr-xr-x | db-arch | 27 | ||||
-rwxr-xr-x | db-unstable | 24 | ||||
-rwxr-xr-x | genpkglist | 3 |
3 files changed, 35 insertions, 19 deletions
@@ -1,19 +1,26 @@ #!/bin/bash -# $Id: db-arch,v 1.7 2003/05/24 00:25:59 judd Exp $ +# $Id: db-arch,v 1.8 2003/05/25 23:50:02 judd Exp $ -echo "==> Updating ABS Tree..." >&2 -cd /tmp -rm -rf arch +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 /tmp/arch/build && /arch/pkgdb 1 +cd $TMPDIR/arch/build && /arch/pkgdb 1 echo "==> Generating Text Package List..." >&2 /arch/genpkglist mv packages.txt /home/ftp/current/setup/packages.txt -echo "==> Generating pacsync2 Database for ARCH..." >&2 -/usr/bin/gensync /tmp/arch/build /tmp/current.db.tar.gz -[ -f /tmp/current.db.tar.gz ] && mv -f /tmp/current.db.tar.gz /home/ftp/current - -rm -rf /tmp/arch +rm -rf $TMPDIR 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 @@ -1,5 +1,5 @@ #!/bin/bash -# $Id: genpkglist,v 1.6 2003/05/21 23:07:33 judd Exp $ +# $Id: genpkglist,v 1.7 2003/05/25 23:50:02 judd Exp $ # # genpkglist @@ -9,7 +9,6 @@ pkgfile="`pwd`/packages.txt" -cd /tmp/arch/build rm -f $pkgfile for category in `find * -type d -maxdepth 0 | grep -v CVS`; do cd $category |