From 5501271678d88ac578082ce2d0705ca211d7e980 Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 17 Aug 1999 05:02:56 +0000 Subject: r132: Initial Import --- dh_installwm | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'dh_installwm') diff --git a/dh_installwm b/dh_installwm index be3a1373..0cae9147 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/lib/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