removing bash/gawk'isms from wineshelllink

Dan Kegel dank at kegel.com
Thu Apr 26 12:41:49 CDT 2007


Ben Taylor wrote:
> I'm still working on the script to make it more "sh" compatible,
> but I think I have a potential fix for the line that reads:
>
>         for i in $(get_menu_entries "$1"); do
>
> and replace it with
>
>          for i in `get_menu_entries "$1"`; do

If you want to be really portable to Solaris, don't put the ; do on
the same line:
the extra-portable syntax is

          for i in `get_menu_entries "$1"`
          do

You're facing an uphill battle, though, if you really want
to support classic sh.  Not many people understand or care.
You'll probably need to set up a nightly build-and-test
on Solaris to keep the code from rotting.

BTW, here's a great book about classic sh programming:
  "Portable Shell Programming" by Bruce Blinn
It's like the "K&R" of shell programming.
- Dan



More information about the wine-devel mailing list