Re: [PATCH/RFC 3/4] git-mw: Adding git-mw.perl script
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 13, 2013, 13:01 UTC
- Message-ID
- <vpq4nd2rwq1.fsf@anie.imag.fr>
- In-Reply-To
- <1371118039-18925-4-git-send-email-benoit.person@ensimag.fr>
benoit.person@ensimag.fr writes:
Show 6 quoted lines
> From: Benoit Person <benoit.person@ensimag.fr> > > This script will be used for all tools and command related to a mediawiki > remote. In this commit we introduce the tool, the way it parses argument > and subcommands and an example of subcommand: "help". It also updates > the Makefile so that the new tool is installed properly.
How does the "make" Vs "make install" work? How does a developer run the tool without installing?
I first tried:
$ ../../bin-wrappers/git mw git: 'mw' is not a git command. See 'git --help'.
Then, this first seem OK:
$ ./git-mw usage: git mw <command> <args>
git mw commands are:
Help Display help information about git mw
Preview Parse and render local file into HTMLBUT, this will take the installed GitMediawiki.pm if it is available, and we don't want this (if one hacks GitMediawiki.pm locally, one wants the new hacked to be taken into account without "make install"ing it).
To understand better how it works, try adding this in git-mw.perl:
print "$_\n" for @INC;
I get this:
/home/moy/local/usr-squeeze/share/perl/5.14.2 /home/moy/local/usr-squeeze/src/MediaWiki-API-0.39/blib/lib /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .
The '.' is there, but it comes after the hardcoded /home/moy/local/usr-squeeze/share/perl/5.14.2 (which has to comes first, to let the install version be robust to whatever comes after).
I think you need an equivalent of Git's toplevel bin-wrappers/git, or perhaps use the same bin-wrapper/git but let "make install" in contrib/mw-to-git/ install GitMediawiki.pm in perl/blib/lib
BTW, I just noticed we had a Git::SVN, so perhaps GitMediawiki should be Git::MediaWiki.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/