From c104d85de0a15fdccb056ceee32351dd91822237 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 9 Nov 1999 23:01:45 +0000 Subject: r306: * Corrected slash substitution problem in dh_installwm. --- dh_installwm | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'dh_installwm') 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:"); + } +} -- cgit v1.2.3