]> Sergey Matveev's repositories - public-inbox.git/blobdiff - public-inbox-init
psgi: enable ReverseProxy middleware by default
[public-inbox.git] / public-inbox-init
old mode 100644 (file)
new mode 100755 (executable)
index 2d24402..d66361d
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
-# Copyright (C) 2014, all contributors (git clone git://80x24.org/public-inbox)
+# Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Initializes a public-inbox, basically a wrapper for git-init(1)
 use strict;
 use warnings;
 my $usage = "public-inbox-init NAME GIT_DIR HTTP_URL ADDRESS [ADDRESS..]";
@@ -8,7 +10,7 @@ use PublicInbox::Config;
 use File::Temp qw/tempfile/;
 use File::Basename qw/dirname/;
 use File::Path qw/mkpath/;
-use File::Path::Expand qw/expand_filename/;
+use Cwd qw/abs_path/;
 
 sub x { system(@_) and die join(' ', @_). " failed: $?\n" }
 sub usage { print STDERR "Usage: $usage\n"; exit 1 }
@@ -59,7 +61,7 @@ close $fh or die "failed to close $filename: $!\n";
 
 my $pfx = "publicinbox.$name";
 my @x = (qw/git config/, "--file=$filename");
-$git_dir = expand_filename($git_dir);
+$git_dir = abs_path($git_dir);
 x(qw(git init -q --bare), $git_dir);
 foreach my $addr (@address) {
        next if $seen{lc($addr)};