Skip to content

Commit c635b05

Browse files
jrngitster
authored andcommitted
git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace
Quote DESTDIR and INSTLIBDIR for the shell in the same way as is done in the toplevel Makefile to avoid confusion in case they contain shell metacharacters. Signed-off-by: Jonathan Nieder <[email protected]> Acked-by: Matthieu Moy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 33f918c commit c635b05

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/mw-to-git/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ INSTALL = install
1616
SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
1717
INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
1818
-s --no-print-directory instlibdir)
19+
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
20+
INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
1921

2022
all: build
2123

2224
install_pm:
23-
$(INSTALL) -d -m 755 $(DESTDIR)$(INSTLIBDIR)/Git
25+
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
2426
$(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
25-
$(DESTDIR)$(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
27+
'$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
2628

2729
build:
2830
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \

0 commit comments

Comments
 (0)