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: Problems with the new base-files-4.0-5?


On 03/17/2011 12:59 PM, Angelo Graziosi wrote:
> Il 17/03/2011 19.00, Angelo Graziosi ha scritto:
>> I have just updated Cygwin, and now starting a console (Cygwin.bat or
>> MinTTY) prints:
>>
>> -bash: ${p}: ambiguous redirect
>>
>> and PRINTER variable isn't set.
>>
>> Reverting to base-files-4.0-4 works just fine and PRINTER is set
>> correctly to my default printer.
>>
>> In 4.0-5 it seems something is broken in /etc/profile.
> 
> Perhaps you need this:
> 
> - ([[ -e ${p} ]] && read -r PRINTER < ${p}) && PRINTER=${PRINTER%%,*}
> + ([[ -e ${p} ]] && read -r PRINTER < "${p}") && PRINTER=${PRINTER%%,*}

/etc/profile is using [[ ]]?  Bad.  That's not required by POSIX, and
will break for anyone who logs in with a shell that doesn't understand
it (for example, dash or posh).  Bashisms should not appear in /etc/profile.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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