]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_testroot
cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch...
[debhelper.git] / dh_testroot
index fcc9b4745c901fbb0fae7b8401d4ff362d85e594..c010dd507c9e6f46409326b3c74077df68e489a5 100755 (executable)
@@ -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<dh_testroot> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+B<dh_testroot> 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<fakeroot(1)>
+
+=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<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut