Bugzilla – Attachment 50125 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 work with git/dev installs
Bug-13216---fix-koha-shell-to-work-with-gitdev-ins.patch (text/plain), 3.14 KB, created by
Mason James
on 2016-04-11 11:19:59 UTC
(
hide
)
Description:
Bug 13216 - fix koha-shell to work with git/dev installs
Filename:
MIME Type:
Creator:
Mason James
Created:
2016-04-11 11:19:59 UTC
Size:
3.14 KB
patch
obsolete
>From a9f831cfb60ed0374077a3ce9fcacdf56dda3373 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Mon, 11 Apr 2016 21:08:07 +1200 >Subject: [PATCH] Bug 13216 - fix koha-shell to work with git/dev installs >Content-Type: text/plain; charset="utf-8" > >The aim of this patch is to enable developers to begin testing Koha tools from a gitified Koha directory, using koha-shell > >this patch adds a new --gitify arg to koha-shell, to be used with the new -d option > >to test new --gitify arg... > >1/ apply 1st patch > >2/ run a "koha-shell -c 'which koha-*'" on a Koha tool, with -d arg > > # perl ~/koha-master/debian/scripts/koha-shell -d ~/koha-master -c 'which koha-list ' moof >/usr/sbin/koha-list <<<< > >3/ observe existing /usr/share/koha/* file is selected, hmm... > >4/ apply 2nd patch - and repeat 2/ with --gitify arg > > # perl ~/koha-master/debian/scripts/koha-shell -d ~/koha-master -g -c 'which koha-list ' moof >~/koha-master/debian/scripts/koha-list <<<< > >5/ observe file from the git repo is now selected > > .-=bonus points, xXxtra merit=-. >6/ run tool to make sure it works > # perl ~/koha-master/debian/scripts/koha-shell -d ~/koha-master -g -c 'koha-list' moof >... > >7/ run the old tool too > # perl ~/koha-master/debian/scripts/koha-shell -c 'koha-list' moof >... >--- > debian/scripts/koha-shell | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/debian/scripts/koha-shell b/debian/scripts/koha-shell >index 26fa411..caa5ce0 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", "kohadir|d=s" ); >+ "preserve-environment|p|m", "verbose|v", "kohadir|d=s", "gitify|g" ); > > if ( !$res || $opts{help} ) { > show_help( !$res ); >@@ -46,16 +46,19 @@ if ( $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'; > push @su_args, '--preserve-env' if $opts{'preserve-environment'}; > push @su_args, '--login' if $opts{login}; > push @su_args, "-u", "$instance-koha"; >+push @su_args, "env "; >+push @su_args, "KOHA_BASE_DIR=$opts{kohadir}" if $opts{kohadir}; >+push @su_args, "PATH=$kohadir/debian/scripts".':$PATH KOHA_GITIFY=1 ' if $opts{gitify}; > push @su_args, >- "env " >- . "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml " >- . "PERL5LIB=$kohadir $shell" >+ "KOHA_CONF=/etc/koha/sites/$instance/koha-conf.xml " >+ . "PERL5LIB=$kohadir $shell " > . ( $opts{command} ? " -c '$opts{command}'" : '' ); > > print "Command: '".join("' '",@su_args)."'\n" if $opts{verbose}; >@@ -90,6 +93,7 @@ Options: > -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. >+ -g, --gitify use shell for a git type 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