On Sat, Oct 9, 2010 at 10:32 AM, Tor Lillqvist <tlillqvist@novell.com> wrote:
Personal, but valid. To test that you actually don't introduce bashisms
in a script you can simply set env variable POSIXLY_CORRECT=1 and then
the bash when invoked as /bin/sh will behave as a strict posix shell.
Unfortunately that doesn't work well enough- Even with POSIXLY_CORRECT=1 some bashisms work
without any warning message. Yeah, so one kinda is left ondering what the point with
POSIXLY_CORRECT is then.
I found this useful script:
http://ftp.openbsd.org/ports/sysutils/checkbashisms/files/checkbashisms.pl . No doubt there might
be other similar ones.
Another way is to actually develop a script using a #! line referring to some suitably limited
shell on your platform, and then change that to /bin/sh before submitting s a patch or
committing to git.
Just to clarify: I posted the script, as I thought it might be useful
to someone else. But I did not intend to commit it to git (If I did,
the post to the ML would have been in the form of a patch)
Norbert.
--tml
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.