#!/bin/sh

USER="$1"

# Try authors.txt first
if grep -i "^$USER =" "../authors.txt" >/dev/null 2>&1; then
    grep -i "^$USER =" "../authors.txt"
    exit 0
fi

# Fallback
echo "$USER = $USER <unknown@unknown.com>" >> "../authors.txt"
echo "$USER = $USER <unknown@unknown.com>"
