summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2003-11-25 02:28:26 +0100
committerJudd Vinet <judd@archlinux.org>2003-11-25 02:28:26 +0100
commitc29d56987d44169e63345012c6532436a643b63b (patch)
treea96a9bc87d652c50da1463019bdb889f88e203fc
parent14ed62289b8026a2a0487cf86c8b0a58c8b7c120 (diff)
downloaddbscripts-c29d56987d44169e63345012c6532436a643b63b.tar.gz
dbscripts-c29d56987d44169e63345012c6532436a643b63b.tar.xz
modifed to work with the new gensync
-rwxr-xr-xdb-arch8
-rwxr-xr-xdb-unstable8
2 files changed, 12 insertions, 4 deletions
diff --git a/db-arch b/db-arch
index 587aaeb..e0dcf0e 100755
--- a/db-arch
+++ b/db-arch
@@ -1,5 +1,5 @@
#!/bin/bash
-# $Id: db-arch,v 1.11 2003/10/12 18:42:55 judd Exp $
+# $Id: db-arch,v 1.12 2003/11/25 01:28:26 judd Exp $
uid=`id -u`
TMPDIR="/tmp/archpkg.$uid"
@@ -11,6 +11,10 @@ if [ -f /tmp/.repolck.$repoid ]; then
echo "error: db generation is already in progress (started by $owner)"
exit 1
fi
+if [ -d /tmp/.gensync ]; then
+ echo "error: someone else is currently running gensync!"
+ exit 1
+fi
# lock
touch /tmp/.repolck.$repoid
@@ -25,7 +29,7 @@ mkdir /tmp/archpkg.$uid; [ $? -gt 0 ] && exit 1
echo "==> Generating Pacman Database for OFFICIAL..." >&2
cd $TMPDIR
CVS_RSH=ssh CVSROOT=:ext: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
+/usr/bin/gensync $TMPDIR/arch/build $TMPDIR/current.db.tar.gz /home/ftp/current
[ -f $TMPDIR/current.db.tar.gz ] && mv -f $TMPDIR/current.db.tar.gz /home/ftp/current
cd $TMPDIR/arch/build && /arch/pkgdb 1
diff --git a/db-unstable b/db-unstable
index c6471ef..e090c88 100755
--- a/db-unstable
+++ b/db-unstable
@@ -1,5 +1,5 @@
#!/bin/bash
-# $Id: db-unstable,v 1.7 2003/10/12 18:42:55 judd Exp $
+# $Id: db-unstable,v 1.8 2003/11/25 01:28:26 judd Exp $
uid=`id -u`
TMPDIR="/tmp/archpkg.$uid"
@@ -11,6 +11,10 @@ if [ -f /tmp/.repolck.$repoid ]; then
echo "error: db generation is already in progress (started by $owner)"
exit 1
fi
+if [ -d /tmp/.gensync ]; then
+ echo "error: someone else is currently running gensync!"
+ exit 1
+fi
# lock
touch /tmp/.repolck.$repoid
@@ -25,7 +29,7 @@ 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
+/usr/bin/gensync $TMPDIR/unstable $TMPDIR/unstable.db.tar.gz /home/ftp/unstable
[ -f $TMPDIR/unstable.db.tar.gz ] && mv -f $TMPDIR/unstable.db.tar.gz /home/ftp/unstable
cd $TMPDIR/unstable && /arch/pkgdb 3