]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installinfo
r245: Initial Import
[debhelper.git] / dh_installinfo
index b6ae40f9ea2f82e8f74abb706821ef60c8b63c23..2983d28f993c90397c6f6005cb0e33638ecfc505 100755 (executable)
@@ -3,7 +3,7 @@
 # Reads debian/info, installs all files listed there into /usr/info
 # and puts appropriate commands into the postinst.
 
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 use Dh_Lib;
 init();
 
@@ -35,7 +35,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                # a tree of info files.
                if ($file=~/\.info$/ && ! $dh{NOSCRIPTS}) {
                        # Figure out what section this file goes in.
-                       my $section;
+                       my $section='';
                        open (IN, "<$file") || die "$file: $!";
                        while (<IN>) {
                                if (/INFO-DIR-SECTION\s+(.*)/) {
@@ -49,11 +49,11 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                        
                        if ($section ne '') {
                                autoscript($PACKAGE,"postinst","postinst-info",
-                                       "s/#SECTION#/$section/;s:#FILE#:$fn:");
+                                       "s/#SECTION#/$section/g;s:#FILE#:$fn:");
                        }
                        else {
                                autoscript($PACKAGE,"postinst","postinst-info-nosection",
-                                       "s/#FILE#/$fn/");
+                                       "s:#FILE#:$fn:");
                        }
                        autoscript($PACKAGE,"prerm","prerm-info", "s:#FILE#:$fn:");
                }