From: Alexander Barton Date: Mon, 1 Sep 2014 22:01:41 +0000 (+0200) Subject: axify: Use information from git to generate AUTHORS file X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-make.git;a=commitdiff_plain;h=2c15ca65f043bc6362f7a2d5337e00d1825012af axify: Use information from git to generate AUTHORS file --- diff --git a/scripts/axify b/scripts/axify index ec3d593..ccd7b8d 100755 --- a/scripts/axify +++ b/scripts/axify @@ -64,9 +64,18 @@ fi # --- Standard project files --- -for f in AUTHORS COPYING README; do +authors=AUTHORS +if [ ! -e AUTHORS ]; then + if git --version >/dev/null 2>&1; then + echo "Creating \"AUTHORS\" file ..." + echo "`git config user.name` <`git config user.email`>" >>AUTHORS + authors= + fi +fi + +for f in $authors COPYING README; do if [ ! -e "$f" ]; then - echo "Creating empty \"$f\" ..." + echo "Creating empty \"$f\" file ..." touch "$f" fi done