summaryrefslogtreecommitdiffstats
path: root/src/commands/svnserve
blob: 6e68acf57866946dafbde5bb2ecfe7b5c4b1e714 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

use strict;
use warnings;

use lib $ENV{GL_LIBDIR};
use Gitolite::Rc;
my $svnserve = $rc{SVNSERVE} || '';
$svnserve ||= "/usr/bin/svnserve -r /var/svn/ -t --tunnel-user=%u";

my $cmd = $ENV{SSH_ORIGINAL_COMMAND};

die "expecting 'svnserve -t', got '$cmd'\n" unless $cmd eq 'svnserve -t';

$svnserve =~ s/%u/$ENV{GL_USER}/g;
exec $svnserve;
die "svnserve exec failed\n";