1
0
mirror of https://github.com/pyenv/pyenv.git synced 2025-11-15 23:03:53 -05:00

Fix some issues reported by shellcheck

This commit is contained in:
Daniel Hahler
2017-06-24 00:12:09 +02:00
parent eda952ab08
commit 5f8a4c4d62
6 changed files with 15 additions and 11 deletions

View File

@@ -42,6 +42,7 @@ extract_initial_comment_block() {
}
collect_documentation() {
# shellcheck disable=SC2016
$(type -p gawk awk | head -1) '
/^Summary:/ {
summary = substr($0, 10)
@@ -86,7 +87,8 @@ collect_documentation() {
}
documentation_for() {
local filename="$(command_path "$1")"
local filename
filename="$(command_path "$1")"
if [ -n "$filename" ]; then
extract_initial_comment_block < "$filename" | collect_documentation
fi
@@ -114,7 +116,7 @@ print_help() {
eval "$(documentation_for "$command")"
[ -n "$help" ] || help="$summary"
if [ -n "$usage" -o -n "$summary" ]; then
if [ -n "$usage" ] || [ -n "$summary" ]; then
if [ -n "$usage" ]; then
echo "$usage"
else