chiark / gitweb /
Infra: Add drs-cron-wrap
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Jun 2015 22:10:06 +0000 (23:10 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 28 Jun 2015 22:14:59 +0000 (23:14 +0100)
Makefile
infra/drs-cron-wrap [new file with mode: 0755]

index c865cc3..8f9a84f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,7 @@ PERLMODULES=Debian/Dgit.pm
 INFRA_PROGRAMS=dgit-repos-server dgit-ssh-dispatch \
        dgit-repos-policy-debian dgit-repos-admin-debian \
        dgit-repos-policy-trusting
-INFRA_EXAMPLES=get-dm-txt ssh-wrap
+INFRA_EXAMPLES=get-dm-txt ssh-wrap drs-cron-wrap
 INFRA_PERLMODULES=Debian/Dgit/Policy/Debian.pm
 
 all:
diff --git a/infra/drs-cron-wrap b/infra/drs-cron-wrap
new file mode 100755 (executable)
index 0000000..52e819b
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+umask 002
+
+distro=$1; shift
+
+srvdir=/srv/dgit.debian.org
+dispatchdir=$srvdir/dispatch-dir
+dgitlive=$srvdir/dgit-live
+
+distrodir=$dispatchdir/distro=$distro
+
+PERLLIB="$dgitlive${PERLLIB+:}${PERLLIB}" \
+exec $dgitlive/infra/dgit-repos-server $distro $distrodir '' --cron