git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] Test environment of git-remote-mw

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 1, 2012, 09:21 UTC
Message-ID
<vpq7gvridzd.fsf@bauges.imag.fr>
In-Reply-To
<vpqpq9jievq.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 17 quoted lines
> "Simon.Cathebras" <Simon.Cathebras@ensimag.imag.fr> writes:
>
>> On the other hand, considering the git-mediawiki is curently on
>> contrib branch, shall we move our test environement from git/t to
>> git/contrib/t ?
>
> If so, that would be to $git/contrib/mw-to-git/t/.
>
> I'm not sur what's best, depending on the future of the tool:
>
> If, once Git-MediaWiki is robust, well-tested, ... and enough people are
> interested, it may make sense to move Git-MediaWiki out of the contrib/
> directory, and integrate it as an official command (like git-svn for
> example). That would make the installation process seamless ("make
> install" would install git-remote-mediawiki like other commands, "make
> doc" would generate the doc, and so on), which would be nice for the
> user.

Here's another attempt to be nice to the user, without getting out of the contrib/ directory. I suggest that you include it in your patch serie, and build your stuff on top of it.

--------------- 8< ----------------- 8< ------------------------
From 25187a652abc0b546be2fb1afb707b32b9f1d4fc Mon Sep 17 00:00:00 2001
From: Matthieu Moy <Matthieu.Moy@imag.fr>
Date: Fri, 1 Jun 2012 11:18:20 +0200
Subject: [PATCH] git-remote-mediawiki: simple Makefile for simple
 installation
This allows the user to run "make check" to install the script in Git's
exec path, following the configuration (manual in config.mak, or through
autoconf).
---
 contrib/mw-to-git/Makefile | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 contrib/mw-to-git/Makefile
diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
new file mode 100644
index 0000000..99b7caa
--- /dev/null
+++ b/contrib/mw-to-git/Makefile
@@ -0,0 +1,29 @@
+-include ../../config.mak
+-include ../../config.mak.autogen
+
+ifndef PERL_PATH
+	PERL_PATH = /usr/bin/perl
+endif
+
+PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
+
+SCRIPT=git-remote-mediawiki
+
+.PHONY: install help doc test
+help:
+	@echo 'This is the help target of the Makefile. Current configuration:'
+	@echo '  gitexecdir = $(gitexecdir_SQ)'
+	@echo '  PERL_PATH = $(PERL_PATH_SQ)'
+	@echo 'Run "$(MAKE) install" to install $(SCRIPT) in gitexecdir.'
+
+install:
+	sed -e '1s|#!.*/perl|#!$(PERL_PATH_SQ)|' $(SCRIPT) \
+            > '$(gitexecdir_SQ)/$(SCRIPT)'
+	chmod 755 '$(gitexecdir)/$(SCRIPT)'
+
+doc:
+	@echo 'Sorry, "make doc" is not implemented yet for $(SCRIPT)'
+
+test:
+	@echo 'Sorry, "make test" is not implemented yet for $(SCRIPT)'
-- 
1.7.10.2.817.g37218b0



-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Matthieu MoyNext: Simon Cathebras
Message 7 of 21 in “Test environment for Git-MediaWiki”
  1. Test environment for Git-MediaWikiSimon.Cathebras, May 30, 2012
  2. 1/3 Script to install, delete and clear a MediaWikiSimon Cathebras, May 30, 2012
  3. 2/3 Test environment of git-remote-mwSimon Cathebras, May 30, 2012
  4. Matthieu MoyMay 31, 2012
  5. Simon.CathebrasJun 1, 2012
  6. Matthieu MoyJun 1, 2012
  7. Matthieu MoyJun 1, 2012
  8. 3/3 Tests file for git-remote-mediawikiSimon Cathebras, May 30, 2012
  9. Matthieu MoyMay 31, 2012
  10. 1/2 FIX: t9360. NEW test t9361 for git pull and git pushGuillaume Sasdy, May 31, 2012
  11. 2/2 FIX: Syntax of shell and perl scripts and posix compliantGuillaume Sasdy, May 31, 2012
  12. FIX: Syntax of shell and perl scripts and posix compliantGuillaume Sasdy, May 31, 2012
  13. FIX: Syntax of shell and perl scripts and posix compliantGuillaume Sasdy, May 31, 2012
  14. 1/3 FIX: cmd_* moved to wiki_* in test-gitmw-lib.sh and other filesGuillaume Sasdy, May 31, 2012
  15. 1/3 Script to install, delete and clear a MediaWikiGuillaume Sasdy, Jun 1, 2012
  16. 2/3 Test environment of git-remote-mwGuillaume Sasdy, Jun 1, 2012
  17. Matthieu MoyJun 1, 2012
  18. Simon.CathebrasJun 1, 2012
  19. Matthieu MoyJun 2, 2012
  20. Simon.CathebrasJun 4, 2012
  21. 3/3 Tests file for git-remote-mediawikiGuillaume Sasdy, Jun 1, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.