From 4a38f18045c251a1e73dd499d8bafe186bb0130b Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 23 Feb 2012 22:47:42 +0100 Subject: [PATCH] maint: assume 'test -x' is portable * lib/Makefile.am (installcheck-local): To verify that the installed scripts are actually executable, simply use 'test -x', instead of resorting to perl and its '-x' file operator. Today, 'test -x' should today be portable to any non-museum system. Since we are at it, improve diagnostic in case of failure. --- lib/Makefile.am | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 422544e..fb80351 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -54,9 +54,10 @@ install-data-hook: chmod +x "$(DESTDIR)$(scriptdir)/$$prog"; \ done -## 'test -x' is not portable. So we use Perl instead. If Perl -## doesn't exist, then this test is meaningless anyway. installcheck-local: - for file in $(dist_script_DATA); do \ - $(PERL) -e "exit ! -x '$(pkgvdatadir)/$$file';" || exit 1; \ - done + @for file in $(dist_script_DATA); do \ + path="$(pkgvdatadir)/$$file"; \ + test -x "$$path" || echo $$path; \ + done \ + | sed 's/$$/: not executable/' \ + | grep . && exit 1; exit 0 -- 2.7.4