diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-04-09 14:29:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-04-09 14:32:40 +1200 |
commit | cd6c4ff92b7e6da0f48abbd0e455f16cc681f80e (patch) | |
tree | 2ba90a20456b9ce7cc49406cb1035062b157dbe3 | |
parent | Restructure shell install and check (diff) | |
download | dotfiles-cd6c4ff92b7e6da0f48abbd0e455f16cc681f80e.tar.gz dotfiles-cd6c4ff92b7e6da0f48abbd0e455f16cc681f80e.zip |
Add xinitrc.d script checks
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | check/xinit.sh | 4 | ||||
-rw-r--r-- | lint/xinit.sh | 1 |
3 files changed, 15 insertions, 2 deletions
@@ -51,6 +51,7 @@ check-login-shell \ check-sh \ check-urxvt \ + check-xinit \ check-yash \ check-zsh \ lint \ @@ -60,6 +61,7 @@ lint-ksh \ lint-sh \ lint-urxvt \ + lint-xinit \ lint-yash .SUFFIXES: @@ -423,7 +425,7 @@ install-vim-pathogen: install-vim-plugins mkdir -p -- $(HOME)/.vim/autoload ln -fs -- ../bundle/pathogen/autoload/pathogen.vim $(HOME)/.vim/autoload -install-x: +install-x: check-xinit mkdir -p -- \ $(HOME)/.config \ $(HOME)/.config/sxhkdrc \ @@ -478,6 +480,9 @@ check-sh: check-urxvt: sh check/urxvt.sh +check-xinit: + sh check/xinit.sh + check-yash: sh check/yash.sh @@ -490,7 +495,7 @@ lint: lint-bash \ lint-ksh \ lint-sh \ lint-urxvt \ - lint-x \ + lint-xinit \ lint-yash lint-bash: check-bash @@ -511,5 +516,8 @@ lint-sh: check-sh lint-urxvt: check-urxvt sh lint/urxvt.sh +lint-xinit: check-xinit + sh lint/xinit.sh + lint-yash: check-yash sh lint/yash.sh diff --git a/check/xinit.sh b/check/xinit.sh new file mode 100644 index 00000000..f8116908 --- /dev/null +++ b/check/xinit.sh @@ -0,0 +1,4 @@ +for xinit in X/xinitrc X/xinitrc.d/*.sh ; do + sh -n "$xinit" || exit +done +printf 'X/xinitrc and all shell scripts in X/xinitrc.d parsed successfully.\n' diff --git a/lint/xinit.sh b/lint/xinit.sh new file mode 100644 index 00000000..b5ff6937 --- /dev/null +++ b/lint/xinit.sh @@ -0,0 +1 @@ +find X -type f \( -name xinitrc -o -name '*.sh' \) -print -exec shellcheck -e SC1090 -s sh -- {} + |