diff options
author | joey <joey> | 1999-08-17 05:12:07 +0000 |
---|---|---|
committer | joey <joey> | 1999-08-17 05:12:07 +0000 |
commit | 430dd853a0827cf0419d2531cf163d4c1e19c4f9 (patch) | |
tree | ae457262f779a02c68718788b46c4c5bf7038626 /dh_installmodules | |
parent | 540263202bcd5666ba65cd40e8587fdc9d48109a (diff) | |
download | debhelper-430dd853a0827cf0419d2531cf163d4c1e19c4f9.tar.gz |
r189: Initial revision
Diffstat (limited to 'dh_installmodules')
-rwxr-xr-x | dh_installmodules | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dh_installmodules b/dh_installmodules new file mode 100755 index 00000000..264ae9c0 --- /dev/null +++ b/dh_installmodules @@ -0,0 +1,28 @@ +#!/usr/bin/perl -w +# +# Register modules with modutils. + +BEGIN { push @INC, "debian", "/usr/lib/debhelper" } +use Dh_Lib; +init(); + +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $file=pkgfile($PACKAGE,"modules"); + + if (! -e $TMP) { + doit("install","-d",$TMP); + } + + if ($file) { + if (! -e "$TMP/etc/modutils") { + doit("install","-d","$TMP/etc/modutils"); + doit("cp","-m0644",$file,"$TMP/etc/modutils/$PACKAGE"); + } + + if (! $dh{NOSCRIPTS}) { + autoscript($PACKAGE,"postinst","postinst-modules","s/#PACKAGE#/$PACKAGE/"); + autoscript($PACKAGE,"postrm","postrm-modules","s/#PACKAGE#/$PACKAGE/"); + } + } +} |