]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_testdir
r338: * Patch from Jorgen `forcer' Schaefer <forcer at mindless.com> (much
[debhelper.git] / dh_testdir
index 4d3c700bea9935db9a14b021533cc201f21fd5aa..8bd960d3c412d50f46313f5475df8bac9e46b06b 100755 (executable)
@@ -1,14 +1,14 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
 #
 # Checks to make sure we are building the package in the right directory.
 # Tests for the existance of debian/control, and for the existance
 # of any other files you specify on the command line.
 
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
+use Debian::Debhelper::Dh_Lib;
+init();
 
-for file in debian/control $@; do
-       if [ ! -e "$file" ] ; then
-               error "\"$file\" not found. Are you sure you are in the correct directory?"
-       fi
-done
+foreach $file ('debian/control',@ARGV) {
+       if (! -e $file) {
+               error("\"$file\" not found. Are you sure you are in the correct directory?");
+       }
+}