> 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 wondering 
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 as a patch or committing to git. 

--tml

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to