Ian Jackson wrote: > If I am currently addressing the person who wrote these scripts > originally then I would be interested to hear where the notion to > switch on $1 in this way came from, since it might be worth updating > the relevant documentation or example packages, or educating the > `expert' which was the original source.
Well, one example if it is in dpkg.postinst/postrm. :-) Manoj uses switch constructs a lot, including in debian-policy.postinst, and his are especially fully commented so I suspect are used as a base by a fair number of other developers. ucf contains an examples/postinst that some developers are probably using. If you google for "Skeleton maintainer script showing all the possible cases.", Charles Briscoe-Smith promulgated one in 1998, which might be the ancestor of the above. debhelper uses test "$1" more extensively than I'd like, but I think still close to minimally, and I've certianly gotten it wrong before. -- see shy jo
signature.asc
Description: Digital signature