clarifications in various messages etc
(thanks to SethX for feedback) - install: a little more verbosity in the mkdir - install and example conf: some of the help text made more clear - auth: error message on bad $cmd is now clearer, plus no perl-warnings to confuse people
This commit is contained in:
parent
7abc629d51
commit
3d44b003c8
|
@ -40,6 +40,9 @@
|
||||||
|
|
||||||
# notes:
|
# notes:
|
||||||
|
|
||||||
|
# - the reponame is a simple name. Do not add the ".git" extension --
|
||||||
|
# that will be added by the program when the actual repo is created
|
||||||
|
|
||||||
# - RW+ means non-ff push is allowed
|
# - RW+ means non-ff push is allowed
|
||||||
# - you can't write just "W" or "+"; it has to be R, or RW, or RW+
|
# - you can't write just "W" or "+"; it has to be R, or RW, or RW+
|
||||||
|
|
||||||
|
|
|
@ -70,11 +70,9 @@ die "$cmd??? you're a funny guy..."
|
||||||
# including the single quotes
|
# including the single quotes
|
||||||
|
|
||||||
my ($verb, $repo) = ($cmd =~ /^\s*(git\s+\S+|\S+)\s+'\/?(.*).git'/);
|
my ($verb, $repo) = ($cmd =~ /^\s*(git\s+\S+|\S+)\s+'\/?(.*).git'/);
|
||||||
die "$verb? I don't do odd jobs, sorry..."
|
die "Sorry, I don't like the command you gave me: $cmd\n"
|
||||||
unless $verb =~ $R_COMMANDS or $verb =~ $W_COMMANDS;
|
unless ( ( $verb =~ $R_COMMANDS or $verb =~ $W_COMMANDS )
|
||||||
|
and $repo =~ $REPONAME_PATT );
|
||||||
die "I don't like the look of $repo, sorry!"
|
|
||||||
unless $repo =~ $REPONAME_PATT;
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# first level permissions check
|
# first level permissions check
|
||||||
|
|
|
@ -10,7 +10,12 @@ our ($REPO_BASE, $GL_ADMINDIR, $GL_CONF);
|
||||||
sub wrap_mkdir
|
sub wrap_mkdir
|
||||||
{
|
{
|
||||||
my $dir = shift;
|
my $dir = shift;
|
||||||
-d $dir or mkdir($dir) or die "mkdir $dir failed: $!\n";
|
if ( -d $dir ) {
|
||||||
|
print STDERR "$dir already exists\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mkdir($dir) or die "mkdir $dir failed: $!\n";
|
||||||
|
print STDERR "created $dir\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# the only path that is *fixed* (can't be changed without changing all 3
|
# the only path that is *fixed* (can't be changed without changing all 3
|
||||||
|
@ -21,7 +26,7 @@ unless (-f $glrc) {
|
||||||
# doesn't exist. Copy it across, tell user to edit it and come back
|
# doesn't exist. Copy it across, tell user to edit it and come back
|
||||||
system("cp conf/example.gitolite.rc $glrc");
|
system("cp conf/example.gitolite.rc $glrc");
|
||||||
print STDERR "created $glrc\n";
|
print STDERR "created $glrc\n";
|
||||||
print STDERR "please edit it, set the paths as you like, and rerun this script\n";
|
print STDERR "please edit it, change the paths if you wish to, and RERUN THIS SCRIPT\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue