diff options
-rwxr-xr-x | licensor | 7 |
1 files 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() { | |||
145 | 145 | ||
146 | guess_author() { | 146 | guess_author() { |
147 | author="$(git config --get user.name)" | 147 | author="$(git config --get user.name)" |
148 | [ -z "$author" ] && | 148 | if [ -z "$author" ]; then |
149 | author="$(getent passwd "$USER" | awk -F: '{sub(/,+/,"",$5);print $5}')" | 149 | author="$(getent passwd "$USER" | awk -F: '{sub(/,+/,"",$5);print $5}')" |
150 | [ -z "$author" ] && | 150 | fi |
151 | author="$USER" | 151 | if [ -z "$author" ]; then author="$USER"; fi |
152 | put "$author" | 152 | put "$author" |
153 | } | 153 | } |
154 | |||
154 | guess_email() { | 155 | guess_email() { |
155 | email="$(git config --get user.email)" | 156 | email="$(git config --get user.email)" |
156 | put "$email" | 157 | put "$email" |