[PC-BSD Pbi-dev] Small patch

Baptiste Daroussin bapt at FreeBSD.org
Mon Nov 7 12:22:34 PST 2011


Hi,

here is a small patch to use realpath(3) instead of ls -l | awk

I think the best would be to directly use realpath instead of get_abspath but I
didn't want to be too much intrusive.

Before sending more patches, I see you often use:
if [ something ]; then return, fi

in general I prefer
[ something ] && return

but that's is a matter of choice, I find the second more readable, but before
sending you patches you won't accept, I prefer asking, would you accept that
kind of patches?

You also often use expr(1) you sh provide some native way to do the mathematical
stuff, would you accept patches to use sh builting things when possible?

last you often to 
cmd ...
if [ $? -eq ]; then
 return
fi

where you would simple 
if cmd; then
...
fi

of cmd && ...
depending of the cases

Would those one be accepted to or would that be against your style.

Sorry for the boring mail, but I prefer to understand your coding rules before
sending useless patches.

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_realpath.patch
Type: text/x-diff
Size: 421 bytes
Desc: not available
URL: <http://lists.pcbsd.org/pipermail/pbi-dev/attachments/20111107/a752a4a1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.pcbsd.org/pipermail/pbi-dev/attachments/20111107/a752a4a1/attachment-0001.bin>


More information about the Pbi-dev mailing list