summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2005-07-01 00:30:36 +0200
committerJudd Vinet <judd@archlinux.org>2005-07-01 00:30:36 +0200
commit7c99f3e12b92f5112f3f79bf55deebcab6c3fc11 (patch)
treebbaf7746f12f0461d0f275413d69d489a1b86802
parent8c4c7c7ce6324bf1aa8ffb0b9c5e378d446166ef (diff)
downloaddbscripts-7c99f3e12b92f5112f3f79bf55deebcab6c3fc11.tar.gz
dbscripts-7c99f3e12b92f5112f3f79bf55deebcab6c3fc11.tar.xz
run gensync through fakeroot first, so all files are owned by root.root
-rw-r--r--db-inc15
1 files changed, 12 insertions, 3 deletions
diff --git a/db-inc b/db-inc
index 9ca9852..3c7e954 100644
--- a/db-inc
+++ b/db-inc
@@ -1,8 +1,13 @@
-# $Id: db-inc,v 1.2 2005/06/21 03:47:38 judd Exp $
+# $Id: db-inc,v 1.3 2005/06/30 22:30:36 judd Exp $
[ "$UID" = "" ] && UID=`uid`
TMPDIR="/tmp/archpkg.$repoid.$UID"
+if [ ! `type -p fakeroot` ]; then
+ echo "error: fakeroot is missing"
+ exit 1
+fi
+
cleanup() {
rm -rf $TMPDIR
# unlock
@@ -37,7 +42,11 @@ if [ $? -gt 0 ]; then
cleanup
exit 1
fi
-/usr/bin/gensync $TMPDIR/$cvsmod $TMPDIR/$reponame.db.tar.gz $ftppath
+
+echo "chown -R root.root $TMPDIR/$cvsmod;" \
+ "/usr/bin/gensync $TMPDIR/$cvsmod $TMPDIR/$reponame.db.tar.gz $ftppath" \
+ | fakeroot
+
[ -f $TMPDIR/$reponame.db.tar.gz ] && mv -f $TMPDIR/$reponame.db.tar.gz $ftppath
echo "==> Scanning for New/Updated/Deleted packages..." >&2
@@ -56,4 +65,4 @@ fi
cleanup
-# vim: set ft=sh:
+# vim: set ts=2 noet ft=sh: