From 02e14506ac57f50b8fe77c79ae72be0403d52b2c Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Tue, 29 Jan 2008 21:34:54 +0000 Subject: sanitize usage and test of buildroot env var --- fix-eol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fix-eol') diff --git a/fix-eol b/fix-eol index 8f50ca8..39059a3 100755 --- a/fix-eol +++ b/fix-eol @@ -6,10 +6,10 @@ use warnings; use File::Find; use File::Temp; -die "No build root defined" unless $ENV{RPM_BUILD_ROOT}; - -# normalize build root my $buildroot = $ENV{RPM_BUILD_ROOT}; +die "No build root defined" unless $buildroot; +die "Invalid build root" unless -d $buildroot; +# normalize build root $buildroot =~ s|/$||; my %exclude_files = ( -- cgit v1.2.1