From 47ffee16484c175cffc2b1cf445334be12ac5bd3 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Sat, 23 May 2009 12:39:39 +0000 Subject: check buildroot as other scripts --- gprintify | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gprintify') diff --git a/gprintify b/gprintify index 34ca30d..f78bbbd 100755 --- a/gprintify +++ b/gprintify @@ -1,7 +1,16 @@ #!/bin/sh - # $Id$ +if [ -z "$RPM_BUILD_ROOT" ]; then + echo "No build root defined" >&2 + exit 1 +fi + +if [ ! -d "$RPM_BUILD_ROOT" ]; then + echo "Invalid build root" >&2 + exit 1 +fi + if test -z "$DONT_GPRINTIFY"; then scripts= for f in `ls $RPM_BUILD_ROOT/etc/rc.d/init.d/* $RPM_BUILD_ROOT/etc/init.d/* 2> /dev/null`; do -- cgit v1.2.1