Skip to content

Commit

Permalink
Dev: doc/man: Clean up ShellCheck warnings
Browse files Browse the repository at this point in the history
In ./doc/man/mkappendix.sh line 10:
for manpage in `printf "%s\n" $@ | sort -f`; do
               ^-- SC2006: Use $(..) instead of legacy `..`.
                              ^-- SC2068: Double quote array expansions to avoid re-splitting elements.

In ./doc/man/ralist.sh line 7:
for f in `find $RADIR -type f -executable`; do
         ^-- SC2044: For loops over find output are fragile. Use find -exec or a while read loop.
         ^-- SC2006: Use $(..) instead of legacy `..`.
               ^-- SC2086: Double quote to prevent globbing and word splitting.
  • Loading branch information
krig committed Oct 23, 2016
1 parent b3a967c commit 3970458
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/man/mkappendix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cat <<EOF
<title>Resource agent manual pages</title>
EOF

for manpage in `printf "%s\n" $@ | sort -f`; do
for manpage in $(printf "%s\n" "$@" | sort -f); do
cat <<EOF
<xi:include href="./$manpage" xmlns:xi="http://www.w3.org/2001/XInclude"/>
EOF
Expand Down
4 changes: 2 additions & 2 deletions doc/man/ralist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ RADIR=$1
PREFIX=$2
SUFFIX=$3

for f in `find $RADIR -type f -executable`; do
echo ${PREFIX}`basename $f`${SUFFIX}
find "$RADIR" -type f -executable | while read -r file; do
echo "${PREFIX}$(basename "$file")${SUFFIX}"
done

0 comments on commit 3970458

Please sign in to comment.