summaryrefslogtreecommitdiff
path: root/dh_installwm
diff options
context:
space:
mode:
authorjoey <joey>1999-11-09 23:01:45 +0000
committerjoey <joey>1999-11-09 23:01:45 +0000
commitc104d85de0a15fdccb056ceee32351dd91822237 (patch)
tree6f7eb98f6a55d09b88b266bbe6734f6db38e7b9c /dh_installwm
parent9b0b1ba0463f46e7d9ea74cd3cd8fd77ca492e2e (diff)
r306: * Corrected slash substitution problem in dh_installwm.
Diffstat (limited to 'dh_installwm')
-rwxr-xr-xdh_installwm31
1 files changed, 16 insertions, 15 deletions
diff --git a/dh_installwm b/dh_installwm
index be3a1373..b3b9059e 100755
--- a/dh_installwm
+++ b/dh_installwm
@@ -1,21 +1,22 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Add to postinst and postrm to register a window manager.
-PATH=debian:$PATH:/usr/lib/debhelper
-. dh_lib
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
+use Dh_Lib;
+init();
-wm=$1
+$wm=shift;
-if [ -z "$wm" ]; then
- error "No window manager was specified."
-fi
+if ($wm eq '') {
+ error("No window manager filename was specified.");
+}
-for PACKAGE in $DH_DOPACKAGES; do
- TMP=`tmpdir $PACKAGE`
-
- if [ ! "$DH_NOSCRIPTS" ]; then
- autoscript "postinst" "postinst-wm" "s/#WM#/$wm/"
- autoscript "postrm" "postrm-wm" "s/#WM#/$wm/"
- fi
-done
+foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
+# $TMP=tmpdir($PACKAGE);
+
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($PACKAGE,"postinst","postinst-wm","s:#WM#:$wm:");
+ autoscript($PACKAGE,"postrm","postrm-wm","s:#WM#:$wm:");
+ }
+}