Skip to content

Commit

Permalink
man/*sh: fix shellcheck warnings, add to shellcheck
Browse files Browse the repository at this point in the history
Now the only remaining file that needs shellcheck warnings to be fixed
is bash-completion. Note that in Makefile's TODO.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Mar 31, 2022
1 parent cacc823 commit ae6cb65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ cfmt:
shellcheck:
shellcheck tests/integration/*.bats tests/integration/*.sh \
tests/integration/*.bash tests/*.sh \
script/*
# TODO: add shellcheck for more sh files
man/*.sh script/*
# TODO: add shellcheck for more sh files (contrib/completions/bash/runc).

shfmt:
shfmt -ln bats -d -w tests/integration/*.bats
Expand Down
4 changes: 2 additions & 2 deletions man/md2man-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# get into this script's directory
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"

[ "$1" = '-q' ] || {
set -x
Expand All @@ -18,7 +18,7 @@ for FILE in *.md; do
base="$(basename "$FILE")"
name="${base%.md}"
num="${name##*.}"
if [ -z "$num" -o "$name" = "$num" ]; then
if [ -z "$num" ] || [ "$name" = "$num" ]; then
# skip files that aren't of the format xxxx.N.md (like README.md)
continue
fi
Expand Down

0 comments on commit ae6cb65

Please sign in to comment.