Re: [PATCH] Get rid of the non portable shell export VAR=VALUE costruct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Torsten Bögershausen <tboegi@xxxxxx> writes:

> On 2014-05-22 14.48, Elia Pinto wrote:
>> Found by check-non-portable-shell.pl
>
> Thanks for picking this up
>> -export TEST_DIRECTORY=$(pwd)/../../../t
>> +TEST_DIRECTORY=$(pwd)/../../../t && export TEST_DIRECTORY
> Minor remark:
> Both commands should go on their own line, like this:
>
> TEST_DIRECTORY=$(pwd)/../../../t &&
> export TEST_DIRECTORY
>
>
> And, unrelated to this patch, 
> there seem to be a lot of && missing in git-remote-testgit.sh.

I have a hard time taking the above && seriously.  pwd is a shell
builtin (when we are not talking about Version 3 UNIX or something) that
can hardly fail.  And when your shell does not support assignment to a
shell variable, you'll have a hard time getting the shell script to run.

That's stuff of the

    if (1+1 != 2) { fputs("Warning: your CPU may be broken", stderr); }

variety.  If you have to check for that, you have bigger problems...

-- 
David Kastrup
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]