summaryrefslogtreecommitdiff
path: root/dh_testroot
diff options
context:
space:
mode:
Diffstat (limited to 'dh_testroot')
-rwxr-xr-xdh_testroot13
1 files changed, 7 insertions, 6 deletions
diff --git a/dh_testroot b/dh_testroot
index fcc9b474..6f9be362 100755
--- a/dh_testroot
+++ b/dh_testroot
@@ -1,10 +1,11 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
#
# Checks to make sure you are root.
-PATH=debian:$PATH:/usr/lib/debhelper
-source dh_lib
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
+use Dh_Lib;
+init();
-if [ "`whoami`" != root ]; then
- error "You must run this as root."
-fi
+if ($< != 0) {
+ error("You must run this as root.");
+}