aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rw-r--r--check/xinit.sh4
-rw-r--r--lint/xinit.sh1
3 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8a363e89..cb814c22 100644
--- a/Makefile
+++ b/Makefile
@@ -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 -- {} +