X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=dh_testroot;h=6ce2a1345c336634a5d15b30050ff1768076dab2;hb=f08266442357056db7a2aa7d23dc8aab03cf5e65;hp=36577b29e019441190a182978ce166cc90a5e203;hpb=fa0b6b8309672b44488dfef0891de99ef6f09d30;p=debhelper.git diff --git a/dh_testroot b/dh_testroot index 36577b2..6ce2a13 100755 --- a/dh_testroot +++ b/dh_testroot @@ -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."); +}