On Fri, Feb 20, 2015 at 3:36 PM, Nick <suckless-...@njw.me.uk> wrote: > Quoth Evan Gates: >> sbase-use_pe.diff : use parameter expansion instead of basename when >> building sbase-box. simpler, shorter, no extra processes > > I don't like this. The sbase Makefile is a really standard, basic, > make at the moment (almost completely within the OpenGroup makefile > spec), and AFAIK builds basically everywhere as a result. Parameter > expansion is something I think of as a bashism, and I doubt is > available everywhere. To my eyes it's uglier too. Spawning an extra > process to call basename is less important than readability, though > of course to an extent that's in the eye of the beholder.
This is POSIX http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02 I think (although I could be wrong) that it's safe to assume we'll be using a POSIX compliant sh (for loops, redirections, etc.). As for pretty vs ugly, I prefer the parameter expansion but that's purely opinion and based on the amount of time I spend in the shell and writing shell scripts. -emg