Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

overwrite projects.list atomically

avoids any potential race conditions between triggers being run
concurrently, and probably avoids gitweb picking up a half-done file too
  • Loading branch information...
commit 289b19d7dc69a1c372464ea3ce099f76f316bf94 1 parent 0419d99
Jeff Mitchell jefferai authored committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/triggers/post-compile/update-gitweb-access-list
6 src/triggers/post-compile/update-gitweb-access-list
View
@@ -20,10 +20,10 @@
plf=`gitolite query-rc GITWEB_PROJECTS_LIST`
[ -z "$plf" ] && plf=$HOME/projects.list
-
+tmpfile=`mktemp $plf.tmp_XXXXXXXX`
(
gitolite list-phy-repos | gitolite access % gitweb R any | grep -v DENIED
gitolite list-phy-repos | gitolite git-config -r % gitweb\\.
) |
- cut -f1 | sort -u | sed -e 's/$/.git/' > $plf
-
+ cut -f1 | sort -u | sed -e 's/$/.git/' > $tmpfile
+mv $tmpfile $plf
Please sign in to comment.
Something went wrong with that request. Please try again.