aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@gmail.com>2018-08-04 11:38:34 +0200
committerGuillaume Rousse <guillomovitch@gmail.com>2018-08-04 11:38:34 +0200
commit0ff382b099d225c542bd772723bec993a6c9a9a2 (patch)
treed9dc343e568e66bb0c895adf9cb0d651df4db029
parent9b94a8304669a477c39424ddfbec10af7e4365ed (diff)
downloadspec-helper-0ff382b099d225c542bd772723bec993a6c9a9a2.tar
spec-helper-0ff382b099d225c542bd772723bec993a6c9a9a2.tar.gz
spec-helper-0ff382b099d225c542bd772723bec993a6c9a9a2.tar.bz2
spec-helper-0ff382b099d225c542bd772723bec993a6c9a9a2.tar.xz
spec-helper-0ff382b099d225c542bd772723bec993a6c9a9a2.zip
add standard buildroot tests
-rwxr-xr-xcheck_desktop_files8
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 =>