diff options
-rw-r--r-- | check/xinit.sh | 9 | ||||
-rw-r--r-- | lint/xinit.sh | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/check/xinit.sh b/check/xinit.sh index f8116908..fa235c9d 100644 --- a/check/xinit.sh +++ b/check/xinit.sh @@ -1,4 +1,7 @@ -for xinit in X/xinitrc X/xinitrc.d/*.sh ; do - sh -n "$xinit" || exit +set \ + X/xinitrc \ + X/xinitrc.d/*.sh +for xinit ; do + sh -n -- "$xinit" || exit done -printf 'X/xinitrc and all shell scripts in X/xinitrc.d parsed successfully.\n' +printf 'Xinit startup scripts parsed successfully.\n' diff --git a/lint/xinit.sh b/lint/xinit.sh index b5ff6937..b2718874 100644 --- a/lint/xinit.sh +++ b/lint/xinit.sh @@ -1 +1,5 @@ -find X -type f \( -name xinitrc -o -name '*.sh' \) -print -exec shellcheck -e SC1090 -s sh -- {} + +set \ + X/xinitrc \ + X/xinitrc.d/*.sh +shellcheck -e SC1090 -s sh -- "$@" +printf 'Xinit startup scripts linted successfully.\n' |