diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-18 15:56:26 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-18 15:56:26 +0000 |
commit | f66649bca45e2c7120ea7c7f4d0f7f61f85ce01f (patch) | |
tree | 2352b6a357e7fb38bdb8302c67f1723111b2a8b5 | |
parent | b21b66cf5127cc5d6760c1a730011199f41587d6 (diff) |
web commit by http://id.inelegant.org/
-rw-r--r-- | doc/patchqueue/lib-fixup.mdwn | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/doc/patchqueue/lib-fixup.mdwn b/doc/patchqueue/lib-fixup.mdwn index 3d509fe8a..0739c2115 100644 --- a/doc/patchqueue/lib-fixup.mdwn +++ b/doc/patchqueue/lib-fixup.mdwn @@ -3,34 +3,36 @@ I'm using Ikiwiki on a box where I don't have root access, so I install all of m I imagine that there's a clean and elegant solution to this, but the hack I'm currently using is to have `./make` alter `ikiwki.in` before it's run, by inserting `use lib ...` lines for each of the directories in `$ENV{PERL5LIB}`. Again, this is clearly ugly, but it allows me to run `./make`, so I'm submitting it FWIW. <pre> +Index: Makefile.PL +=================================================================== +--- Makefile.PL (revision 2630) ++++ Makefile.PL (working copy) +@@ -24,6 +24,7 @@ + ) + + extra_build: ++ LANG=C ./lib-fixup.pl ikiwiki.in + LANG=C ./ikiwiki.in doc html --templatedir=templates \ + --underlaydir=basewiki \ + --wikiname="ikiwiki" --verbose --no-rcs \ Index: lib-fixup.pl =================================================================== --- lib-fixup.pl (revision 0) +++ lib-fixup.pl (revision 0) -@@ -0,0 +1,7 @@ +@@ -0,0 +1,9 @@ +#!/usr/bin/perl -i.bak -p +use strict; +use warnings; -+my $libs = join('', map { "use lib '$_';\n" } split /:/, $ENV{PERL5LIB}); -+s/(use IkiWiki;)/$1\n$libs/; -+ -+ ++my @dirs = $ENV{PERL5LIB} =~ /:/ ? split /:/, $ENV{PERL5LIB} : $ENV{PERL5LIB}; ++if (@dirs) { ++ my $libs = join('', map { " use lib '$_';\n" } @dirs); ++ s/(use IkiWiki;)/$libs$1/; ++} ++ Property changes on: lib-fixup.pl ___________________________________________________________________ Name: svn:executable + * -Index: Makefile.PL -=================================================================== ---- Makefile.PL (revision 2628) -+++ Makefile.PL (working copy) -@@ -24,6 +24,7 @@ - ) - - extra_build: -+ LANG=C ./lib-fixup.pl ikiwiki.in - LANG=C ./ikiwiki.in doc html --templatedir=templates \ - --underlaydir=basewiki \ - --wikiname="ikiwiki" --verbose --no-rcs \ </pre>
\ No newline at end of file |