Hey everyone, thanks for the suggestions, I've just included all of them.
On Mon, Feb 04, 2013 at 05:09:48PM +0800, Chris Down wrote: > Since this issue cropped up I figured I might as well take a quick look at > the script. There are two other things that might be worth changing after a > quick skim: > > - Not sure what's up with all the ''[ -n "`which foo`" ]'' idioms. Use > ''type'' and just check the exit code. funny thing: the type statement is actually longer because type does not support -q and the usual >/dev/nul... line adds characters. But sure, you're right. > - Instead of escaping in heredocs, you can just use 'EOF' instead of EOF. Thanks! I wrote this introduction last night at 4am and was too tired to look up the right escaping for heredocs. > On 4 February 2013 17:04, Chris Down <ch...@chrisdown.name> wrote: > > On 4 February 2013 16:56, Thomas Dean <78...@web.de> wrote: > > > One thing to mention: sh links to dash in my case, which has no built-in > > > "source" command. Is there a standalone substitute? > > > > Use ''.'' instead of ''source'', it's POSIX. I consider ``source'' more readable than ``.'' but given that the first is less portable I changed it. Is the rest of the code dash-friendly? Because I normally don't care about debian & friends. v4hn
pgpDD2N7P9_At.pgp
Description: PGP signature