X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_testroot;h=c010dd507c9e6f46409326b3c74077df68e489a5;hb=dc8af2bf7e978505080c66b4f8b94f8409113ba2;hp=fcc9b4745c901fbb0fae7b8401d4ff362d85e594;hpb=938b66ee19e113785e6655b1c3e73e9003e6464c;p=debhelper.git diff --git a/dh_testroot b/dh_testroot index fcc9b47..c010dd5 100755 --- a/dh_testroot +++ b/dh_testroot @@ -1,10 +1,37 @@ -#!/bin/sh -e -# -# Checks to make sure you are root. +#!/usr/bin/perl -w -PATH=debian:$PATH:/usr/lib/debhelper -source dh_lib +=head1 NAME -if [ "`whoami`" != root ]; then - error "You must run this as root." -fi +dh_testroot - ensure that a package is built as root + +=head1 SYNOPSIS + +B [S>] + +=head1 DESCRIPTION + +B simply checks to see if you are root. If not, it exits with an +error. Debian packages must be built as root, though you can use +L + +=cut + +use strict; +use Debian::Debhelper::Dh_Lib; +inhibit_log(); + +if ($< != 0) { + error("You must run this as root (or use fakeroot)."); +} + +=head1 SEE ALSO + +L + +This program is a part of debhelper. + +=head1 AUTHOR + +Joey Hess + +=cut