From: Han-Wen Nienhuys Date: Fri, 08 Dec 2006 17:13:50 GMT Subject: [PATCH] Install git-sh-setup.sh into $(prefix)/share/git-core. Call with explicit path. Message-ID: git-sh-setup isn't a 'normal' binary, in that it should be called by bash only and not run in a subshell. Therefore, it should not be installed in a executable directory, but rather in $prefix/share/git-core/ From 4cefe86667d01ecc912c1f9d8b78c831c33792a1 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 6 Dec 2006 13:27:16 +0100 Subject: Signed-off-by: Han-Wen Nienhuys --- Makefile | 10 ++++++++-- git-am.sh | 2 +- git-applymbox.sh | 2 +- git-applypatch.sh | 2 +- git-bisect.sh | 2 +- git-checkout.sh | 2 +- git-clean.sh | 2 +- git-commit.sh | 2 +- git-fetch.sh | 2 +- git-instaweb.sh | 2 +- git-lost-found.sh | 2 +- git-merge.sh | 2 +- git-pull.sh | 2 +- git-quiltimport.sh | 2 +- git-rebase.sh | 2 +- git-repack.sh | 2 +- git-request-pull.sh | 2 +- git-reset.sh | 2 +- git-resolve.sh | 2 +- git-revert.sh | 2 +- git-tag.sh | 2 +- git-verify-tag.sh | 2 +- 22 files changed, 29 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index a1861de..cb9b745 100644 --- a/Makefile +++ b/Makefile @@ -116,8 +116,10 @@ STRIP ?= strip prefix = $(HOME) bindir = $(prefix)/bin +datadir = $(prefix)/share +GIT_datadir = $(datadir)/git-core gitexecdir = $(bindir) -template_dir = $(prefix)/share/git-core/templates/ +template_dir = $(GIT_datadir)/templates/ # DESTDIR= # default configuration for gitweb @@ -166,7 +168,7 @@ SCRIPT_SH = \ git-merge-one-file.sh git-parse-remote.sh \ git-pull.sh git-rebase.sh \ git-repack.sh git-request-pull.sh git-reset.sh \ - git-resolve.sh git-revert.sh git-sh-setup.sh \ + git-resolve.sh git-revert.sh \ git-tag.sh git-verify-tag.sh \ git-applymbox.sh git-applypatch.sh git-am.sh \ git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \ @@ -550,6 +552,7 @@ endif # Shell quote (do not use $(call) to accommodate ancient setups); SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER)) +GIT_datadir_SQ = $(subst ','\'',$(GIT_datadir)) DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) bindir_SQ = $(subst ','\'',$(bindir)) @@ -604,6 +607,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ + -e 's!@@GIT_datadir@@!$(GIT_datadir)!g' \ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ $@.sh >$@+ chmod +x $@+ @@ -816,6 +820,8 @@ install: all '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \ fi $(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;) + $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_datadir_SQ)' + $(INSTALL) -m755 git-sh-setup.sh '$(DESTDIR_SQ)$(GIT_datadir_SQ)' install-doc: $(MAKE) -C Documentation install diff --git a/git-am.sh b/git-am.sh index afe322b..b9dfcf0 100755 --- a/git-am.sh +++ b/git-am.sh @@ -5,7 +5,7 @@ USAGE='[--signoff] [--dotest=] [--utf8] [--binary] [--3way] [--interactive] [--whitespace=