[Rt-commit] rt branch, 4.0/rt-apache-absolute-paths, created. rt-4.0.7-62-g8b324f2
Thomas Sibley
trs at bestpractical.com
Fri Sep 28 13:50:47 EDT 2012
The branch, 4.0/rt-apache-absolute-paths has been created
at 8b324f206d6029e8439704bca9e83d10c07b9d4e (commit)
- Log -----------------------------------------------------------------
commit 8b324f206d6029e8439704bca9e83d10c07b9d4e
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Sep 28 10:48:42 2012 -0700
Turn relative paths into absolute paths for Apache
This makes it easier to run rt-apache out of a git checkout since you
can provide a relative path instead of the full checkout path:
devel/tools/rt-apache --root .
diff --git a/devel/tools/rt-apache b/devel/tools/rt-apache
index 2f36334..647afb0 100755
--- a/devel/tools/rt-apache
+++ b/devel/tools/rt-apache
@@ -6,6 +6,7 @@ use warnings;
use Getopt::Long;
use FindBin;
use Pod::Usage;
+use File::Spec::Functions qw(rel2abs);
my %opt = (
root => ($ENV{RTHOME} || "/opt/rt4"),
@@ -36,6 +37,10 @@ GetOptions( \%opt,
) or pod2usage( 1 );
pod2usage( {verbose => 2} ) if $opt{help};
+# All paths must be absolute
+$opt{$_} = rel2abs($opt{$_})
+ for qw(root modules);
+
# Determine what module to use
my $mod;
if ($opt{fcgid} + $opt{fastcgi} + $opt{perl} > 1) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list