From c67c95de9ebd18b7d2a6ac8d3bc81e4d497623b4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 27 Dec 2016 14:39:26 +1300 Subject: Add zsh checking --- Makefile | 6 +++++- check/zsh | 6 ++++++ lint/zsh | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 check/zsh create mode 100755 lint/zsh 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 -- {} \; -- cgit v1.2.3