gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master f4ba4ff 2/3: doc/genauthors: now accounts for


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master f4ba4ff 2/3: doc/genauthors: now accounts for names with more than two components
Date: Fri, 30 Aug 2019 07:03:34 -0400 (EDT)

branch: master
commit f4ba4ff6561f497594f00619c8e45ffd1f1d0b57
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    doc/genauthors: now accounts for names with more than two components
    
    Until now, the `doc/genauthors' script (which is in charge of updating the
    list of authors in the PDF book) could only deal with two component
    names. However, last commit's author (Miguel de Val-Borro) has a
    three-component name, so it wasn't displayed properly.
    
    With this commit, AWK actually loops through the tokens to print the
    name, so it can now deal with names with any number of components.
---
 doc/genauthors | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/genauthors b/doc/genauthors
index 078fbf1..c26b69f 100755
--- a/doc/genauthors
+++ b/doc/genauthors
@@ -51,8 +51,10 @@ if [ -d $1/.git ]; then
     # (in particular "make -jN" with N > 1), so authors.texi needs to be
     # recreated anyway.
     git --git-dir=$1/.git shortlog --numbered --summary --email --no-merges \
-        | sed -e 's/</ /' -e 's/>/ /' -e 's/@/@@/' -e "s/è/@\`e/"           \
-        | awk '{printf "%s %s (%s, %s)@*\n", $2, $3, $4, $1}'               \
+        | sed -e 's/</ /' -e 's/>/ /' -e 's/@/@@/' \
+              -e "s/è/@\`e/" -e "s/é/@\'e/" \
+        | awk '{for(i=2;i<NF;++i) printf("%s ", $i); \
+                printf("(%s, %s)@*\n", $NF, $1)}' \
         > $1/doc/authors.texi
 
     # Clean up:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]