Re: Skeleton maintainer scripts
Adam P. Harris:
>Charles, these scripts rock out. They're a little wordy, you might
>strip down a little. More comments below. Email a new version to
Glad you like them...
> #! /bin/sh
>
> Why the space after the shbang? I don't personally like that.
Just habit, I suppose. The reason is that (as I understand it) there
are some ancient Unices which use "#! /" as the magic number to
identify scripts with, rather than the more usual "#!". I got into the
habit of including the space, partly for that, and partly because, to
me, it looks nicer. It's never caused any problems...
> # I've attempted to document all...
>
> Cut this para.
OK, but see later...
> # Some general points relevant to preinst scripts (gleaned from the
> # Debian policy manual version 2.4.0.0, and the packaging manual):
>
> Trim down to one line
Like this?
# Some general points relevant to preinst scripts:
> :
>
> Why these colons here against the left column? The colons aren't
> needed here, and I don't like breaking the indent flow.
They -are- needed, at least with bash. I had to put them in to get the
script to work. Try removing them -- bash will complain loudly. If
you really want, I'll indent the colons to match the rest of the text,
but there needs to be a command there, even if it's a no-op.
Arto Astala:
> I agree, even more since nobody reads it anyway, then you can replace
> the colons with comments like # your code here
I'd use
: your code here
so that it'll still work even if you don't fill them all in.
> I would kepp this in entirety in one script and in others have oneliner
> that tells: for general points see scriptxx
Yes, I think you're right.
> Was your intention to use something that is guaranteed to bomb
> so the maintainer is forced to think at these points? I would
> (still) use comments like
> # your code here
No, my intention was to have something that -works-. Believe me, if
there are no commands there, it'll -fail-. (Under bash, at least, and
with a somewhat obscure error message.)
--
Charles Briscoe-Smith
White pages entry, with PGP key: <URL:http://alethea.ukc.ac.uk/wp?95cpb4>
PGP public keyprint: 74 68 AB 2E 1C 60 22 94 B8 21 2D 01 DE 66 13 E2
--
To UNSUBSCRIBE, email to debian-dpkg-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: