aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rwxr-xr-xcheck/zsh6
-rwxr-xr-xlint/zsh2
3 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 30183494..97fec6e5 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@
check-sh \
check-urxvt \
check-yash \
+ check-zsh \
lint \
lint-bash \
lint-bin \
@@ -388,7 +389,7 @@ install-yash : check-yash install-sh
install -pm 0644 -- yash/yashrc "$(HOME)"/.yashrc
install -pm 0644 -- yash/yashrc.d/* "$(HOME)"/.yashrc.d
-install-zsh : install-sh
+install-zsh : check-zsh install-sh
install -m 0755 -d -- "$(HOME)"/.zshrc.d
install -pm 0644 -- zsh/zprofile "$(HOME)"/.zprofile
install -pm 0644 -- zsh/zshrc "$(HOME)"/.zshrc
@@ -425,6 +426,9 @@ check-urxvt :
check-yash :
check/yash
+check-zsh :
+ check/zsh
+
lint : check \
lint-bash \
lint-bin \
diff --git a/check/zsh b/check/zsh
new file mode 100755
index 00000000..39a6c1e9
--- /dev/null
+++ b/check/zsh
@@ -0,0 +1,6 @@
+#!/bin/sh
+for zsh in zsh/* zsh/zshrc.d/* ; do
+ [ -f "$zsh" ] || continue
+ zsh -n "$zsh" || exit
+done
+printf 'All zsh(1) scripts parsed successfully.\n'
diff --git a/lint/zsh b/lint/zsh
new file mode 100755
index 00000000..9f6af707
--- /dev/null
+++ b/lint/zsh
@@ -0,0 +1,2 @@
+#!/bin/sh
+find zsh -type f -print -exec shellcheck -e SC1090 -s ksh -- {} \;