source code changes after splitting into src/doc/conf

This commit is contained in:
Sitaram Chamarty 2009-08-27 15:24:08 +05:30
parent f0099a125e
commit 4e74652b38
3 changed files with 30 additions and 5 deletions

View file

@ -11,9 +11,9 @@ $GL_ADMINDIR=$ENV{HOME} . "/.gitolite";
# the ones below can be left as they are, unless for some reason you want them # the ones below can be left as they are, unless for some reason you want them
# elsewhere # elsewhere
$GL_CONF="$GL_ADMINDIR/gitolite.conf"; $GL_CONF="$GL_ADMINDIR/conf/gitolite.conf";
$GL_KEYDIR="$GL_ADMINDIR/keydir"; $GL_KEYDIR="$GL_ADMINDIR/keydir";
$GL_CONF_COMPILED="$GL_ADMINDIR/gitolite.conf-compiled.pm"; $GL_CONF_COMPILED="$GL_ADMINDIR/conf/gitolite.conf-compiled.pm";
# -------------------------------------- # --------------------------------------
# this should be the last line in this file, per perl rules # this should be the last line in this file, per perl rules

View file

@ -60,7 +60,7 @@ unless (my $ret = do $glrc)
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# command and options for authorized_keys # command and options for authorized_keys
my $AUTH_COMMAND="$GL_ADMINDIR/gl-auth-command"; my $AUTH_COMMAND="$GL_ADMINDIR/src/gl-auth-command";
my $AUTH_OPTIONS="no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty"; my $AUTH_OPTIONS="no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty";
my $USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._-]*$); # very simple pattern my $USERNAME_PATT=qr(^\@?[0-9a-zA-Z][0-9a-zA-Z._-]*$); # very simple pattern
@ -192,7 +192,7 @@ for my $repo (keys %repos)
mkdir("$repo.git") or die "mkdir $repo.git failed: $!"; mkdir("$repo.git") or die "mkdir $repo.git failed: $!";
my_chdir("$repo.git"); my_chdir("$repo.git");
system("git init --bare"); system("git init --bare");
system("cp $GL_ADMINDIR/update-hook.pl hooks/update"); system("cp $GL_ADMINDIR/src/update-hook.pl hooks/update");
system("chmod 755 hooks/update"); system("chmod 755 hooks/update");
my_chdir("$ENV{HOME}/$REPO_BASE"); my_chdir("$ENV{HOME}/$REPO_BASE");
} }
@ -237,7 +237,7 @@ system("rm ~/.ssh/new_authkeys");
my_chdir($GL_ADMINDIR); my_chdir($GL_ADMINDIR);
if (-d ".git") if (-d ".git")
{ {
system("git add -A keydir"); # stage all changes in keydir system("git add -A conf keydir"); # stage all operational data
# and if there are any # and if there are any
if (system("git diff --cached --quiet") ) if (system("git diff --cached --quiet") )
{ {

25
src/install.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
# install gitolite
# quick safety check: do not run if ~/.gitolite.rc is present
[[ -f ~/.gitolite.rc ]] && {
echo sorry\; \'~/.gitolite.rc\' already exists
exit 1
}
# this one is fixed to the location shown
cp conf/example.gitolite.rc ~/.gitolite.rc
# the destinations below are defaults; if you change the paths in the "rc"
# file above, these destinations also must change accordingly
# mkdir $REPO_BASE, $GL_ADMINDIR, it's subdirs, and $GL_KEYDIR
mkdir ~/repositories
mkdir ~/.gitolite
mkdir ~/.gitolite/{src,conf,doc,keydir}
# copy conf, src, doc
cp -a src doc conf ~/.gitolite
cp conf/example.conf ~/.gitolite/conf/gitolite.conf