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:
Sitaram Chamarty 2009-09-10 19:05:07 +05:30
parent 7abc629d51
commit 3d44b003c8
3 changed files with 13 additions and 7 deletions

View file

@ -40,6 +40,9 @@
# 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
# - you can't write just "W" or "+"; it has to be R, or RW, or RW+

View file

@ -70,11 +70,9 @@ die "$cmd??? you're a funny guy..."
# including the single quotes
my ($verb, $repo) = ($cmd =~ /^\s*(git\s+\S+|\S+)\s+'\/?(.*).git'/);
die "$verb? I don't do odd jobs, sorry..."
unless $verb =~ $R_COMMANDS or $verb =~ $W_COMMANDS;
die "I don't like the look of $repo, sorry!"
unless $repo =~ $REPONAME_PATT;
die "Sorry, I don't like the command you gave me: $cmd\n"
unless ( ( $verb =~ $R_COMMANDS or $verb =~ $W_COMMANDS )
and $repo =~ $REPONAME_PATT );
# ----------------------------------------------------------------------------
# first level permissions check

View file

@ -10,7 +10,12 @@ our ($REPO_BASE, $GL_ADMINDIR, $GL_CONF);
sub wrap_mkdir
{
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
@ -21,7 +26,7 @@ unless (-f $glrc) {
# doesn't exist. Copy it across, tell user to edit it and come back
system("cp conf/example.gitolite.rc $glrc");
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;
}