make $bindir absolute

This commit is contained in:
Sitaram Chamarty 2010-02-09 17:00:01 +05:30 committed by Sitaram Chamarty
parent 72bac2a21a
commit 65b8c0c48a
2 changed files with 2 additions and 0 deletions

View file

@ -32,6 +32,7 @@ our %repos;
# the common setup module is in the same directory as this running program is # the common setup module is in the same directory as this running program is
my $bindir = $0; my $bindir = $0;
$bindir =~ s/\/[^\/]+$//; $bindir =~ s/\/[^\/]+$//;
$bindir = "$ENV{PWD}/$bindir" unless $bindir =~ /^\//;
require "$bindir/gitolite.pm"; require "$bindir/gitolite.pm";
# ask where the rc file is, get it, and "do" it # ask where the rc file is, get it, and "do" it

View file

@ -68,6 +68,7 @@ our ($REPONAME_PATT, $REPOPATT_PATT, $USERNAME_PATT, $AUTH_COMMAND, $AUTH_OPTION
# the common setup module is in the same directory as this running program is # the common setup module is in the same directory as this running program is
my $bindir = $0; my $bindir = $0;
$bindir =~ s/\/[^\/]+$//; $bindir =~ s/\/[^\/]+$//;
$bindir = "$ENV{PWD}/$bindir" unless $bindir =~ /^\//;
require "$bindir/gitolite.pm"; require "$bindir/gitolite.pm";
# ask where the rc file is, get it, and "do" it # ask where the rc file is, get it, and "do" it