]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_testroot
r767: This commit was manufactured by cvs2svn to create tag
[debhelper.git] / dh_testroot
index 36577b29e019441190a182978ce166cc90a5e203..6ce2a1345c336634a5d15b30050ff1768076dab2 100755 (executable)
@@ -1,10 +1,13 @@
-#!/bin/sh -e
+#!/usr/bin/perl -w
 #
 # Checks to make sure you are root.
 
-PATH=debian:$PATH:/usr/lib/debhelper
-. 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
+# Test for uid = 0, not username of root, becuase
+# some people rename root.
+if ($< != 0) {
+       error("You must run this as root.");
+}