]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installwm
r406: * Fixed dh_installwm. Oops. Closes: #81124
[debhelper.git] / dh_installwm
index 8cb7af0372aab7f1f6bcc199444e7a3de2f7a240..9a970feb308c705fe2139b551d29c46b9dea8395 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 #
-# Add to postinst and postrm to register a window manager.
+# Add to postinst and prerm to register a window manager.
 
 use Debian::Debhelper::Dh_Lib;
 init();
@@ -10,10 +10,10 @@ if (! defined $dh{PRIORITY}) {
 }
 
 if (@ARGV) {
-       # This is here for backwards comatability. If the filename doesn't
+       # This is here for backwards compatability. If the filename doesn't
        # include a path, assume it's in /usr/X11R6/bin.
        if ($ARGV[0] !~ m:/:) {
-               $ARGV[0]="/usr/X11R6/$ARGV[0]";
+               $ARGV[0]="/usr/X11R6/bin/$ARGV[0]";
        }
 }
 
@@ -22,7 +22,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        $file=pkgfile($PACKAGE,"wm");
 
        if ($file) {
-               @wm=filearray($file);
+               @wm=filearray($file, '.');
        }
 
        if (($PACKAGE eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
@@ -32,7 +32,7 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        if (@wm && ! $dh{NOSCRIPTS}) {
                foreach (@wm) {
                        autoscript($PACKAGE,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
-                       autoscript($PACKAGE,"postrm","postrm-wm","s:#WM#:$_:");
+                       autoscript($PACKAGE,"prerm","prerm-wm","s:#WM#:$_:");
                }
        }
 }