* [PATCH] Use SHELL_PATH
@ 2008-07-16 1:31 SungHyun Nam
2008-07-16 10:47 ` Sverre Rabbelier
0 siblings, 1 reply; 7+ messages in thread
From: SungHyun Nam @ 2008-07-16 1:31 UTC (permalink / raw)
To: git
Signed-off-by: SungHyun Nam <goweol@gmail.com>
---
t/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/Makefile b/t/Makefile
index a778865..0d65ced 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -26,7 +26,7 @@ clean:
$(RM) -r 'trash directory' test-results
aggregate-results:
- ./aggregate-results.sh test-results/t*-*
+ '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
full-svn-test:
--
1.5.6.3.350.g6c11a
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Use SHELL_PATH
2008-07-16 1:31 [PATCH] Use SHELL_PATH SungHyun Nam
@ 2008-07-16 10:47 ` Sverre Rabbelier
2008-07-16 11:00 ` Johannes Schindelin
2008-07-16 15:46 ` Junio C Hamano
0 siblings, 2 replies; 7+ messages in thread
From: Sverre Rabbelier @ 2008-07-16 10:47 UTC (permalink / raw)
To: namsh; +Cc: git
On Wed, Jul 16, 2008 at 3:31 AM, SungHyun Nam <goweol@gmail.com> wrote:
>
> Signed-off-by: SungHyun Nam <goweol@gmail.com>
> ---
> t/Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/Makefile b/t/Makefile
> index a778865..0d65ced 100644
> --- a/t/Makefile
> +++ b/t/Makefile
> @@ -26,7 +26,7 @@ clean:
> $(RM) -r 'trash directory' test-results
>
> aggregate-results:
> - ./aggregate-results.sh test-results/t*-*
> + '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
>
> # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
> full-svn-test:
> --
> 1.5.6.3.350.g6c11a
It is not clear to me what this patch does, there is no justification
in the commit msg either. Instead you say what is being done, which we
can see from the commit diff. Please clarify?
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use SHELL_PATH
2008-07-16 10:47 ` Sverre Rabbelier
@ 2008-07-16 11:00 ` Johannes Schindelin
2008-07-16 15:46 ` Junio C Hamano
1 sibling, 0 replies; 7+ messages in thread
From: Johannes Schindelin @ 2008-07-16 11:00 UTC (permalink / raw)
To: sverre; +Cc: namsh, git
Hi,
On Wed, 16 Jul 2008, Sverre Rabbelier wrote:
> On Wed, Jul 16, 2008 at 3:31 AM, SungHyun Nam <goweol@gmail.com> wrote:
> >
> > Signed-off-by: SungHyun Nam <goweol@gmail.com>
> > ---
> > t/Makefile | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/t/Makefile b/t/Makefile
> > index a778865..0d65ced 100644
> > --- a/t/Makefile
> > +++ b/t/Makefile
> > @@ -26,7 +26,7 @@ clean:
> > $(RM) -r 'trash directory' test-results
> >
> > aggregate-results:
> > - ./aggregate-results.sh test-results/t*-*
> > + '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
> >
> > # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
> > full-svn-test:
> > --
> > 1.5.6.3.350.g6c11a
>
> It is not clear to me what this patch does, there is no justification
> in the commit msg either. Instead you say what is being done, which we
> can see from the commit diff. Please clarify?
My _guess_ is that this comes from a platform like Solaris, where /bin/sh
is not even POSIX. And I'd expect aggregate-results to use some
non-trivial shell constructs which break with such a broken shell.
But I completely agree, the commit message desperately wants to include
some justification.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use SHELL_PATH
2008-07-16 10:47 ` Sverre Rabbelier
2008-07-16 11:00 ` Johannes Schindelin
@ 2008-07-16 15:46 ` Junio C Hamano
2008-07-16 16:05 ` Junio C Hamano
2008-07-17 0:32 ` SungHyun Nam
1 sibling, 2 replies; 7+ messages in thread
From: Junio C Hamano @ 2008-07-16 15:46 UTC (permalink / raw)
To: sverre; +Cc: namsh, git
"Sverre Rabbelier" <alturin@gmail.com> writes:
> On Wed, Jul 16, 2008 at 3:31 AM, SungHyun Nam <goweol@gmail.com> wrote:
>>
>> Signed-off-by: SungHyun Nam <goweol@gmail.com>
>> ---
>> t/Makefile | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/t/Makefile b/t/Makefile
>> index a778865..0d65ced 100644
>> --- a/t/Makefile
>> +++ b/t/Makefile
>> @@ -26,7 +26,7 @@ clean:
>> $(RM) -r 'trash directory' test-results
>>
>> aggregate-results:
>> - ./aggregate-results.sh test-results/t*-*
>> + '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
>>
>> # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
>> full-svn-test:
>> --
>> 1.5.6.3.350.g6c11a
>
> It is not clear to me what this patch does, there is no justification
> in the commit msg either. Instead you say what is being done, which we
> can see from the commit diff. Please clarify?
It wants to make sure that the shell specified from the toplevel Makefile
(or from make command line) is used to run the aggregation script. It is
often necessary when platform /bin/sh is not quite POSIX (e.g. the script
in question uses arithmetic expansion "$(( $var1 + $var2 ))").
Just saying "Use specified shell to run shell scripts" on the title line
would be sufficient, but I wonder if this is the only remaining place...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Use SHELL_PATH
2008-07-16 15:46 ` Junio C Hamano
@ 2008-07-16 16:05 ` Junio C Hamano
2008-07-17 0:32 ` SungHyun Nam
1 sibling, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2008-07-16 16:05 UTC (permalink / raw)
To: sverre; +Cc: namsh, git
Junio C Hamano <gitster@pobox.com> writes:
> It wants to make sure that the shell specified from the toplevel Makefile
> (or from make command line) is used to run the aggregation script. It is
> often necessary when platform /bin/sh is not quite POSIX (e.g. the script
> in question uses arithmetic expansion "$(( $var1 + $var2 ))").
>
> Just saying "Use specified shell to run shell scripts" on the title line
> would be sufficient, but I wonder if this is the only remaining place...
People on funny platforms might find this one useful, which is consistent
with the way the patch under discussion called the shell. This lets you
to say
SHELL_PATH = /Program Files/GNU/Bash
or something silly like that ;-)
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 9b52071..a2b2627 100644
--- a/Makefile
+++ b/Makefile
@@ -153,7 +153,7 @@ all::
# broken, or spawning external process is slower than built-in grep git has).
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
- @$(SHELL_PATH) ./GIT-VERSION-GEN
+ @'$(SHELL_PATH_SQ)' ./GIT-VERSION-GEN
-include GIT-VERSION-FILE
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Use SHELL_PATH
2008-07-16 15:46 ` Junio C Hamano
2008-07-16 16:05 ` Junio C Hamano
@ 2008-07-17 0:32 ` SungHyun Nam
2008-07-17 0:38 ` SungHyun Nam
1 sibling, 1 reply; 7+ messages in thread
From: SungHyun Nam @ 2008-07-17 0:32 UTC (permalink / raw)
To: git; +Cc: sverre, namsh, git
Junio C Hamano wrote:
> "Sverre Rabbelier" <alturin@gmail.com> writes:
>
>> On Wed, Jul 16, 2008 at 3:31 AM, SungHyun Nam <goweol@gmail.com> wrote:
>>> Signed-off-by: SungHyun Nam <goweol@gmail.com>
>>> ---
>>> t/Makefile | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/t/Makefile b/t/Makefile
>>> index a778865..0d65ced 100644
>>> --- a/t/Makefile
>>> +++ b/t/Makefile
>>> @@ -26,7 +26,7 @@ clean:
>>> $(RM) -r 'trash directory' test-results
>>>
>>> aggregate-results:
>>> - ./aggregate-results.sh test-results/t*-*
>>> + '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
>>>
>>> # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
>>> full-svn-test:
>>> --
>>> 1.5.6.3.350.g6c11a
>> It is not clear to me what this patch does, there is no justification
>> in the commit msg either. Instead you say what is being done, which we
>> can see from the commit diff. Please clarify?
>
> It wants to make sure that the shell specified from the toplevel Makefile
> (or from make command line) is used to run the aggregation script. It is
> often necessary when platform /bin/sh is not quite POSIX (e.g. the script
> in question uses arithmetic expansion "$(( $var1 + $var2 ))").
>
> Just saying "Use specified shell to run shell scripts" on the title line
> would be sufficient, but I wonder if this is the only remaining place...
For the 'make test', yes, it's the only remaining place to me.
Well, I skip the cvs/svn/.. tests which I never use.
And I need this patch for the Solaris.
And I also need to run a script function below between 'make all'
and 'make test/install'. I hope GIT does this. Of course, GIT's
Makefile would use SHELL_PATH and PERL_PATH.
git_fix_interpreter()
{
p="/usr/local/bin/perl"
if test -x "$p"
then
for f in $(find . -name '*.perl')
do
e=$(dirname $f)/$(basename $f .perl)
[ -f "$e" -a -x "$e" ] \
&& "$p" -pi -e
's@^#!/usr/(bin/perl.*)$@#!/usr/local/\1@g' "$e"
done
fi
if test -x /bin/bash
then
for f in $(find . -name '*.sh')
do
e=$(dirname $f)/$(basename $f .sh)
[ -f "$e" -a -x "$e" ] \
&& "$p" -pi -e 's@^#!/bin/sh(.*)$@#!/bin/bash\1@g' "$e"
done
fi
}
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-17 0:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 1:31 [PATCH] Use SHELL_PATH SungHyun Nam
2008-07-16 10:47 ` Sverre Rabbelier
2008-07-16 11:00 ` Johannes Schindelin
2008-07-16 15:46 ` Junio C Hamano
2008-07-16 16:05 ` Junio C Hamano
2008-07-17 0:32 ` SungHyun Nam
2008-07-17 0:38 ` SungHyun Nam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).