Skip to content

Commit

Permalink
git-remote-mediawiki: add a git bin-wrapper for developement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benoit Person authored and Junio C Hamano committed Jul 8, 2013
1 parent 8bade1e commit 8a7c215
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions contrib/mw-to-git/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Copyright (C) 2013
# Matthieu Moy <Matthieu.Moy@imag.fr>
#
# To build and test:
#
# make
# bin-wrapper/git mw preview Some_page.mw
# bin-wrapper/git clone mediawiki::http://example.com/wiki/
#
# To install, run Git's toplevel 'make install' then run:
#
# make install
Expand Down
14 changes: 14 additions & 0 deletions contrib/mw-to-git/bin-wrapper/git
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

# git executable wrapper script for Git-Mediawiki to run tests without
# installing all the scripts and perl packages.

GIT_ROOT_DIR=../../..
GIT_EXEC_PATH=$(cd "$(dirname "$0")" && cd ${GIT_ROOT_DIR} && pwd)

GITPERLLIB="$GIT_EXEC_PATH"'/contrib/mw-to-git'"${GITPERLLIB:+:$GITPERLLIB}"
PATH="$GIT_EXEC_PATH"'/contrib/mw-to-git:'"$PATH"

export GITPERLLIB PATH

exec "${GIT_EXEC_PATH}/bin-wrappers/git" "$@"

0 comments on commit 8a7c215

Please sign in to comment.