diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-27 14:39:26 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-27 14:39:26 +1300 |
commit | c67c95de9ebd18b7d2a6ac8d3bc81e4d497623b4 (patch) | |
tree | 81d9087c0ba9764b36fcc0e16fbaac2a4d15e6af | |
parent | Merge branch 'port/bsd/openbsd' (diff) | |
download | dotfiles-c67c95de9ebd18b7d2a6ac8d3bc81e4d497623b4.tar.gz dotfiles-c67c95de9ebd18b7d2a6ac8d3bc81e4d497623b4.zip |
Add zsh checking
-rw-r--r-- | Makefile | 6 | ||||
-rwxr-xr-x | check/zsh | 6 | ||||
-rwxr-xr-x | lint/zsh | 2 |
3 files changed, 13 insertions, 1 deletions
@@ -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 -- {} \; |