> On Jan 31, 2020, at 9:27 AM, Pascal <p....@orange.fr> wrote:
> 
> 
> 
>> Le 29 janv. 2020 à 05:00, John Ralls <jra...@ceridwen.us> a écrit :
>> 
>> 
>> 
>>> On Jan 28, 2020, at 11:27 AM, Pascal <p....@orange.fr> wrote:
>>> 
>>> Hello John,
>>> 
>>>> Le 27 janv. 2020 à 21:56, John Ralls <jra...@ceridwen.us> a écrit :
>>>> 
>>>> Pascal,
>>>> 
>>>> Yes, the default is Zsh, but if you're upgrading from an earlier MacOS I 
>>>> think it's supposed to stay on bash unless you overtly change it. It 
>>>> certainly has for me. What's returned by `sudo ls /var/select/sh`?
>>> 
>>> % ls -l /var/select/sh
>>> lrwxr-xr-x  1 root  wheel     9B 24 oct 05:04 /var/select/sh@ -> /bin/bash
>>> 
>>> HTH, Pascal.
>>> https://blady.pagesperso-orange.fr
>>> 
>>> 
>> 
>> Well, that's interesting. I guess you'll have to instrument the erroring if 
>> statements to see why it's complaining: If it's bash it's not likely to be 
>> the -o.
> 
> Hello John,
> 
> I have make some changes, see:
> https://github.com/Blady-Com/gtk-mac-bundler/tree/proposal01
> 
> a) "test -n" seems not equivalent to "test ! -z" on Catalina:
> c=toto
> d=
> if test -n $c; then echo nc; fi
> if test -n $d; then echo nd; fi
> if test -z $c; then echo zc; fi
> if test -z $d; then echo zd; fi
> gives with Catalina:
> nc
> nd
> zd
> instead of:
> nc
> zd
> I haven't found any clue on Internet.
> 
> b) test "-a" or "-o" options seems working but not every where.
> Information about on Internet is confusing.
> 
> c) line 44, LC_MESSAGES is unset but used just after, is it correct ?
> 

Pascal,

a) Use [[ -n $d ]]... works, test and [ -n $d ] don't. Interestingly the zsh 
man page has a warning about that.

b) I suspect the solution is the same, so all instances of test should change 
to [[ ... ]].

c) It's perhaps redundant but it makes it clear that we're clearing all of the 
localization environment variables to set them from defaults.

I guess I should mention that I never found the shell-script method of setting 
localization to work all that well and in GnuCash and Gramps I wrote 
lower-level code to do it better. That's easiest for programs coded in C/C++ 
because you can call the NSLocale functions directly and parse the results; in 
Python you still have to shell out to `defaults` because the alternative is 
importing the rather heavyweight pyobjc into your project.

One other note on your commit: There's a bunch of odd-looking whitespace 
changes. Make sure that you use only spaces for indentation, GitHub doesn't 
display tabs consistently.

Regards,
John Ralls



_______________________________________________
gtk-osx-users-list mailing list
gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list

Reply via email to