Bugzilla – Attachment 49578 Details for
Bug 13216
fix koha-shell to work with git/dev installs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13216 - fix koha shell to accept alternative perl5lib paths
Bug-13216---fix-koha-shell-to-accept-alternative-p.patch (text/plain), 2.94 KB, created by
Mirko Tietgen
on 2016-03-25 09:07:33 UTC
(
hide
)
Description:
Bug 13216 - fix koha shell to accept alternative perl5lib paths
Filename:
MIME Type:
Creator:
Mirko Tietgen
Created:
2016-03-25 09:07:33 UTC
Size:
2.94 KB
patch
obsolete
>From 7c0081f468db6df70c5bf8b5dbdb816b5a18ba76 Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Fri, 16 Oct 2015 15:13:44 +1300 >Subject: [PATCH] Bug 13216 - fix koha shell to accept alternative perl5lib > paths > >To test: >gitify an install > >run sudo koha-shell instance >run env | grep PERL5LIB it should be set to /usr/share/koha/lib > >run sudo koha-shell -d /path/to/your/git/install >run env | grep PERL5LIB it should be set to /path/to/your/git/install > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >--- > debian/scripts/koha-shell | 25 ++++++++++++++++--------- > 1 file changed, 16 insertions(+), 9 deletions(-) > >diff --git a/debian/scripts/koha-shell b/debian/scripts/koha-shell >index b8d92f5..26fa411 100755 >--- a/debian/scripts/koha-shell >+++ b/debian/scripts/koha-shell >@@ -22,7 +22,7 @@ Getopt::Long::Configure("bundling"); > > my %opts; > my $res = GetOptions( \%opts, "command|c=s", "help|h", "login|l", "shell|s=s", >- "preserve-environment|p|m", "verbose|v" ); >+ "preserve-environment|p|m", "verbose|v", "kohadir|d=s" ); > > if ( !$res || $opts{help} ) { > show_help( !$res ); >@@ -39,7 +39,13 @@ if ( !-e "/etc/koha/sites/$instance" ) { > exit(1); > } > my $shell = $opts{shell} || $ENV{SHELL} || '/bin/sh'; >- >+my $kohadir; >+if ( $opts{kohadir} ) { >+ $kohadir = $opts{kohadir}; >+} >+else { >+ $kohadir = '/usr/share/koha/lib'; >+} > # Now we're set up, build the 'su' command > my @su_args; > push @su_args, '/usr/bin/sudo'; >@@ -49,7 +55,7 @@ push @su_args, "-u", "$instance-koha"; > push @su_args, > "env " > . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml " >- . "PERL5LIB=/usr/share/koha/lib $shell" >+ . "PERL5LIB=$kohadir $shell" > . ( $opts{command} ? " -c '$opts{command}'" : '' ); > > print "Command: '".join("' '",@su_args)."'\n" if $opts{verbose}; >@@ -76,13 +82,14 @@ koha-shell -- gives you a shell with your Koha environment set up > Usage: koha-shell [options] [instance name] > > Options: >- -c, --command COMMAND pass COMMAND to the invoked shell >- -h, --help show this help and quit >- -l, --login make the shell a login shell >+ -c, --command COMMAND pass COMMAND to the invoked shell >+ -h, --help show this help and quit >+ -l, --login make the shell a login shell > -m, -p, >- --preserve-environment do not reset environment variables >- -s, --shell SHELL use SHELL instead of the one from your environment >- -v, --verbose output the full command that will be executed >+ --preserve-environment do not reset environment variables >+ -s, --shell SHELL use SHELL instead of the one from your environment >+ -v, --verbose output the full command that will be executed >+ -d, --kohadir /path/to/koha use a different PERL5LIB directory, for example in a git install. > > The default shell is the one currently in use. Refer to su(1) for more detail > on these options. >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13216
:
43446
| 49578 |
50125
|
50126
|
50202