From 0ff382b099d225c542bd772723bec993a6c9a9a2 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Sat, 4 Aug 2018 11:38:34 +0200 Subject: add standard buildroot tests --- check_desktop_files | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'check_desktop_files') diff --git a/check_desktop_files b/check_desktop_files index 4f012a2..da43fcd 100755 --- a/check_desktop_files +++ b/check_desktop_files @@ -9,12 +9,16 @@ use warnings; use File::Find; +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 $FILTER = qr/\.desktop\z/; sub main { - my $buildroot = $ENV{RPM_BUILD_ROOT}; - find( { wanted => -- cgit v1.2.1