gitolite/t/glt
Sitaram Chamarty 379b0c9549 install/test made easy (WARNING: read below)
(1) testing is very easy, just run this from a clone

        t/g3-clean-install-setup-test

    BUT BE WARNED THIS IS DESTRUCTIVE; details in t/WARNING

(2) install is equally simple; see 'INSTALL' in the main directory
2012-03-24 10:30:41 +05:30

32 lines
768 B
Perl
Executable file

#!/usr/bin/perl
use strict;
use warnings;
use FindBin;
BEGIN { $ENV{GL_BINDIR} = $FindBin::RealBin; }
print STDERR "TRACE: glt(", join( ")(", @ARGV ), ")\n";
my $cmd = shift or die "need command";
my $user = shift or die "need user";
my $rc;
$ENV{G3T_USER} = $user;
if ( $cmd eq 'push' ) {
$rc = system( "git", $cmd, "--receive-pack=$ENV{GL_BINDIR}/gitolite-receive-pack", @ARGV );
} else {
$rc = system( "git", $cmd, "--upload-pack=$ENV{GL_BINDIR}/gitolite-upload-pack", @ARGV );
}
if ( $? == -1 ) {
die "F: failed to execute: $!\n";
} elsif ( $? & 127 ) {
printf STDERR "E: child died with signal %d\n", ( $? & 127 );
exit 1;
} else {
printf STDERR "W: child exited with value %d\n", $? >> 8 if $? >> 8;
exit( $? >> 8 );
}
exit 0;