This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: dash-0.5.9.1-1


On 2/23/2017 2:46 PM, Steven Penny wrote:
> On Thu, 23 Feb 2017 20:38:08, Andrey Repin wrote:
>> $ cat /etc/postinstall/zp_dash-as-bin-sh.dash
>> #!/bin/dash
> 
>> test ! -h /bin/sh.exe && {
>>   _f="$(mktemp /bin/sh.XXXXXX)"
>>   {
>>     mv /bin/sh.exe "$_f"
>>     ln -s /bin/dash.exe /bin/sh.exe
>>   } || mv "$_f" /bin/sh.exe
>>   rm "$_f"
>> }
>> exit 0
> 
> This is a bad idea.
> 
> If script succeeds, then yes sh is now a symlink to Dash, but only for my
> system. I still have to use #!/bin/dash with my scripts, because otherwise
> people with Bash -> sh will not get the speed boost. The whole point of
> this
> thread is that it should be changed for everyone.

If *your* script has a dependency to run using *dash* instead of *sh*
then you _must_ use #!/bin/dash anyway.  And what I _*I*_ don't want
dash as /bin/sh?  You see not everyone in the community will agree.  You
can make the suggestion to those using your script to do so otherwise
but forcing dash as /bin/sh worldwide isn't something you can actually do.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]