X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_testroot;h=6ce2a1345c336634a5d15b30050ff1768076dab2;hb=refs%2Ftags%2Fupstream_version_0_29;hp=c704109411d54ffb16c11d1ee9a91fb6ad78ca19;hpb=473b811394da493f2643d196d3ea2316b6ea034f;p=debhelper.git diff --git a/dh_testroot b/dh_testroot index c704109..6ce2a13 100755 --- a/dh_testroot +++ b/dh_testroot @@ -1,12 +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(); # Test for uid = 0, not username of root, becuase # some people rename root. -if [ "`id -u`" != 0 ]; then - error "You must run this as root." -fi +if ($< != 0) { + error("You must run this as root."); +}