From c20a2b097fc20b1499f6aa5b14767c6ef49ee6d3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Jul 2022 20:51:33 -0500 Subject: Use if forms --- licensor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/licensor b/licensor index 9f9a808..3458e7d 100755 --- a/licensor +++ b/licensor @@ -145,12 +145,13 @@ search_licenses() { guess_author() { author="$(git config --get user.name)" - [ -z "$author" ] && + if [ -z "$author" ]; then author="$(getent passwd "$USER" | awk -F: '{sub(/,+/,"",$5);print $5}')" - [ -z "$author" ] && - author="$USER" + fi + if [ -z "$author" ]; then author="$USER"; fi put "$author" } + guess_email() { email="$(git config --get user.email)" put "$email" -- cgit 1.4.1-21-gabe81