aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:44:56 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-31 22:44:56 +1300
commit3e540185b71e7a3bfa9348a13691bf40569a06aa (patch)
tree2e9869aa47c4250121438d480c8386122a2e9f60
parenta179e2b48b0c6f6f57421d0f99b49ab6f4970dd5 (diff)
downloaddotfiles-3e540185b71e7a3bfa9348a13691bf40569a06aa.tar.gz
dotfiles-3e540185b71e7a3bfa9348a13691bf40569a06aa.zip
Check and lint URxvt Perls correctly
Require that the URxvt Perls are built correctly. There's only one at the moment, so I'll make that the single prerequisite for the `check-urxvt` target.
-rw-r--r--Makefile2
-rw-r--r--check/urxvt.sh7
-rw-r--r--lint/urxvt.sh7
3 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 84da1d44..5b316294 100644
--- a/Makefile
+++ b/Makefile
@@ -556,7 +556,7 @@ check-login-shell:
check-sh:
sh check/sh.sh
-check-urxvt:
+check-urxvt: urxvt/ext/select
sh check/urxvt.sh
check-xinit:
diff --git a/check/urxvt.sh b/check/urxvt.sh
index ee39e6c9..9fff4502 100644
--- a/check/urxvt.sh
+++ b/check/urxvt.sh
@@ -1,4 +1,5 @@
-for perl in urxvt/ext/*.pl ; do
- perl -c "$perl" || exit
+set -- urxvt/ext/*.pl
+for perl ; do
+ perl -c "${perl%.pl}" || exit
done
-printf 'All Perl scripts in urxvt/ext parsed successfully.\n'
+printf 'URxvt Perl extensions parsed successfully.\n'
diff --git a/lint/urxvt.sh b/lint/urxvt.sh
index 507034be..477157f7 100644
--- a/lint/urxvt.sh
+++ b/lint/urxvt.sh
@@ -1 +1,6 @@
-find urxvt/ext -type f ! -name '*.pl' -print -exec perlcritic --brutal -- {} \;
+set --
+for pl in urxvt/ext/*.pl ; do
+ set -- "$@" "${pl%.pl}"
+done
+perlcritic --brutal -- "${pl%.pl}"
+printf 'URxvt Perl extensions linted successfully.\n'