Re: [PATCH v2 4/6] build dashless "bin-wrappers" directory similar to installed bindir
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 30, 2009, 06:28 UTC
- Message-ID
- <7vmy241q75.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1259561971-25730-5-git-send-email-mmogilvi_git@miniinfo.net>
Matthew Ogilvie <mmogilvi_git@miniinfo.net> writes:
Show 21 quoted lines
> diff --git a/wrap-for-bin.sh b/wrap-for-bin.sh
> new file mode 100644
> index 0000000..ee2bc98
> --- /dev/null
> +++ b/wrap-for-bin.sh
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +
> +# wrap-for-bin.sh: Template for git executable wrapper scripts
> +# to run test suite against sandbox, but with only bindir-installed
> +# executables in PATH. The Makefile copies this into various
> +# files in bin-wrappers, substituting
> +# __GIT_EXEC_PATH__ and __PROG__.
> +
> +GIT_EXEC_PATH="__GIT_EXEC_PATH__"
> +GIT_TEMPLATE_DIR="__GIT_EXEC_PATH__/templates/blt"
> +GITPERLLIB="__GIT_EXEC_PATH__/perl/blib/lib"
> +PATH="__GIT_EXEC_PATH__/bin-wrappers:$PATH"
> +export GIT_EXEC_PATH GIT_TEMPLATE_DIR GITPERLLIB PATH
> +
> +exec "${GIT_EXEC_PATH}/__PROG__" "$@"Two issues, one minor and one not so minor but not grave:
- Everywhere else we seem to use "@@UPPERCASE_NAME@@" not double-underscore as placeholders like the above.
- @@PROG@@ is under our control and it is easy for us to guarantee that it won't have any funny letters, but GIT_EXEC_PATH is not. Is it safe to do a simple-minded "sed" replacement, or does it need the usual sq trick employed in the other replacement in our Makefile?