Skip to content

Commit

Permalink
shellcheck fixes in git-whoami
Browse files Browse the repository at this point in the history
  • Loading branch information
unixorn committed Jul 1, 2018
1 parent 99ea576 commit 6dde88d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/git-whoami
Expand Up @@ -14,13 +14,13 @@ get_email() {
}

get_name() {
git config user.name || getent passwd $(id -un) | cut -d : -f 5 | cut -d , -f 1
git config user.name || getent passwd "$(id -un)" | cut -d : -f 5 | cut -d , -f 1
}

: ${GIT_AUTHOR_NAME=$(get_name)}
: ${GIT_COMMITTER_NAME=$(get_name)}
: ${GIT_AUTHOR_EMAIL=$(get_email)}
: ${GIT_COMMITTER_EMAIL=$(get_email)}
: ${GIT_AUTHOR_NAME="$(get_name)"}
: ${GIT_COMMITTER_NAME="$(get_name)"}
: ${GIT_AUTHOR_EMAIL="$(get_email)"}
: ${GIT_COMMITTER_EMAIL="$(get_email)"}

author="$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>"
commit="$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
Expand All @@ -30,4 +30,4 @@ if [ "$author" = "$commit" ]; then
else
echo "Author: $author"
echo "Commit: $commit"
fi
fi

0 comments on commit 6dde88d

Please sign in to comment.