git-remote-mediawiki: add a git bin-wrapper for developement

The introduction of the Git::Mediawiki package makes it impossible to test, without installation, git-remote-mediawiki and git-mw. Using a git bin-wrapper enables us to define proper $GITPERLLIB to force the use of the developement version of the Git::Mediawiki package, bypassing its installed version if any. An alternate solution was to 'install' all the files required at each build but it pollutes the toplevel with untracked files. Signed-off-by: Benoit Person <benoit.person@ensimag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Benoit Person committed Jul 4, 2013 at 22:38 UTC 8a7c21514073f25e8262e311c0fa93101da0e6d3
2 files changed +20
contrib/mw-to-git/Makefile
+6
@@ -2,6 +2,12 @@
2 # Copyright (C) 2013
3 # Matthieu Moy <Matthieu.Moy@imag.fr>
4 #
5 +# To build and test:
6 +#
7 +# make
8 +# bin-wrapper/git mw preview Some_page.mw
9 +# bin-wrapper/git clone mediawiki::http://example.com/wiki/
10 +#
11 # To install, run Git's toplevel 'make install' then run:
12 #
13 # make install
contrib/mw-to-git/bin-wrapper/git new
+14
@@ -0,0 +1,14 @@
1 +#!/bin/sh
2 +
3 +# git executable wrapper script for Git-Mediawiki to run tests without
4 +# installing all the scripts and perl packages.
5 +
6 +GIT_ROOT_DIR=../../..
7 +GIT_EXEC_PATH=$(cd "$(dirname "$0")" && cd ${GIT_ROOT_DIR} && pwd)
8 +
9 +GITPERLLIB="$GIT_EXEC_PATH"'/contrib/mw-to-git'"${GITPERLLIB:+:$GITPERLLIB}"
10 +PATH="$GIT_EXEC_PATH"'/contrib/mw-to-git:'"$PATH"
11 +
12 +export GITPERLLIB PATH
13 +
14 +exec "${GIT_EXEC_PATH}/bin-wrappers/git" "$@"