]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installinfo
r397: horribly broke everything I touched :-)
[debhelper.git] / dh_installinfo
index 55deb3625310a63b2e7c363d1b4c0ff75be9cfc4..146aede996a4802571836ec99e0baff473e52b8b 100755 (executable)
@@ -3,8 +3,7 @@
 # Reads debian/info, installs all files listed there into /usr/share/info
 # and puts appropriate commands into the postinst.
 
-BEGIN { push @INC, "debian", "/usr/share/debhelper" }
-use Dh_Lib;
+use Debian::Debhelper::Dh_Lib;
 init();
 
 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
@@ -14,7 +13,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        undef @info;
        
        if ($file) {
-               @info=filearray($file);
+               @info=filearray($file, ".");
        }
 
        if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
@@ -33,7 +32,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        foreach $file (@info) {
                # Only register with install-info if this is a head file in
                # a tree of info files.
-               if ($file=~/\.info$/ && ! $dh{NOSCRIPTS}) {
+               if ($file !~ /-\d+$/ && ! $dh{NOSCRIPTS}) {
                        # Figure out what section this file goes in.
                        my $section='';
                        open (IN, "<$file") || die "$file: $!";
@@ -45,9 +44,10 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                        }
                        close IN;
                        
-                       my $fn="/usr/share/info/".Dh_Lib::basename($file);
+                       my $fn="/usr/share/info/".Debian::Debhelper::Dh_Lib::basename($file);
                        
                        if ($section ne '') {
+                               $section=~s:/:\\/:g; # allow / in section.
                                autoscript($PACKAGE,"postinst","postinst-info",
                                        "s/#SECTION#/$section/g;s:#FILE#:$fn:");
                        }