summaryrefslogtreecommitdiffstats
path: root/db-arch
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2004-04-01 23:04:14 +0200
committerJudd Vinet <judd@archlinux.org>2004-04-01 23:04:14 +0200
commitf277673d7e083f2cb32537a1764c1819edecb923 (patch)
treeb6c6df1942da83c909d9216e31a026d9ffec3b78 /db-arch
parentc73bc36772e5811700cc80cc24c8a759b16cbc1e (diff)
downloaddbscripts-f277673d7e083f2cb32537a1764c1819edecb923.tar.gz
dbscripts-f277673d7e083f2cb32537a1764c1819edecb923.tar.xz
changed mysql temp file so one user can run multiple db-gen scripts concurrently
Diffstat (limited to 'db-arch')
-rwxr-xr-xdb-arch9
1 files changed, 7 insertions, 2 deletions
diff --git a/db-arch b/db-arch
index d2c93b8..506346b 100755
--- a/db-arch
+++ b/db-arch
@@ -1,9 +1,9 @@
#!/bin/bash
-# $Id: db-arch,v 1.13 2004/01/06 02:50:53 judd Exp $
+# $Id: db-arch,v 1.14 2004/04/01 21:09:13 judd Exp $
uid=`id -u`
-TMPDIR="/tmp/archpkg.$uid"
repoid=1
+TMPDIR="/tmp/archpkg.$repoid.$uid"
cleanup() {
rm -rf $TMPDIR
@@ -38,6 +38,11 @@ mkdir /tmp/archpkg.$uid; [ $? -gt 0 ] && exit 1
echo "==> Generating Pacman Database for CURRENT..." >&2
cd $TMPDIR
CVS_RSH=ssh CVSROOT=:ext:cvs.archlinux.org:/home/cvs-arch cvs -q export -r CURRENT -f arch/build
+# check again
+if [ -d /tmp/.gensync ]; then
+ echo "error: someone else is currently running gensync!"
+ exit 1
+fi
/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