diff options
Diffstat (limited to 'check_desktop_files')
-rwxr-xr-x | check_desktop_files | 8 |
1 files changed, 6 insertions, 2 deletions
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 => |