diff options
Diffstat (limited to 'doc/PROGRAMMING')
-rw-r--r-- | doc/PROGRAMMING | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index 1115d998..5befe565 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -239,16 +239,18 @@ isnative($package) is a native debian package. As a side effect, $dh{VERSION} is set to the version number of the package. -autoscript($package, $scriptname, $snippetname, $sedcommands || $sub) +autoscript($package, $scriptname, $snippetname, $substparam) Pass parameters: - binary package to be affected - script to add to - filename of snippet - - (optional) EITHER sed commands to run on the snippet. Ie, - s/#PACKAGE#/$PACKAGE/ Note: Passed to the shell inside double - quotes. - OR a perl sub to invoke with $_ set to each line of the snippet in - turn. + - (optional) A substitution parameter, which is one of 3 times: + * sed commands to run on the snippet. E.g. s/#PACKAGE#/$PACKAGE/ + Note: Passed to the shell inside double quotes. + * a perl sub to invoke with $_ set to each line of the snippet + in turn. + * a hashref, where each key will substitute "#${key}#" with the + value that $key points to. [debhelper (>= 10.7)] This command automatically adds shell script snippets to a debian maintainer script (like the postinst or prerm). Note that in v6 mode and up, the snippets are added in reverse |