[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] (no subject)
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] (no subject) |
Date: |
Mon, 30 May 2016 04:33:47 +0000 (UTC) |
branch: master
commit 81d591a10efbfaf069e8b20d88b3ff0b6d1efa76
Author: Mohammad Akhlaghi <address@hidden>
Date: Mon May 30 13:25:44 2016 +0900
AUTHORS now contains the version
Until now the `AUTHORS' file did not have the version of Gnuastro that it
referred to. So `genauthors' now reads the `.version' file and includes the
version in the produced AUTHORS file.
In `genauthors', tests were set to report unused and empty variable values,
also two typos were corrected in the generated AUTHORS file.
---
Makefile.am | 13 +++++++------
genauthors | 34 ++++++++++++++++++++++++++++------
2 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 02131e4..75c750f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -120,11 +120,11 @@ dist_doc_DATA = README
## Files that are only distributed
## ===============================
-EXTRA_DIST = bootstrap bootstrap.conf genauthors .dir-locals.el \
- $(top_srcdir)/.version bootstrapped/m4/gnulib-cache.m4 \
- bootstrapped/README .autom4te.cfg lib/gnuastro/commonargs.h \
- lib/gnuastro/commonparams.h lib/gnuastro/fixedstringmacros.h \
- lib/gnuastro/neighbors.h lib/gnuastro/README
+EXTRA_DIST = bootstrap bootstrap.conf genauthors .dir-locals.el .version \
+ bootstrapped/m4/gnulib-cache.m4 bootstrapped/README \
+ .autom4te.cfg lib/gnuastro/commonargs.h \
+ lib/gnuastro/commonparams.h lib/gnuastro/fixedstringmacros.h \
+ lib/gnuastro/neighbors.h lib/gnuastro/README
@@ -262,4 +262,5 @@ install-exec-local:
##
## - The genauthors script will not do anything (make/update the
## AUTHORS file) when there is no git repository.
-AUTHORS::; $(top_srcdir)/genauthors
+AUTHORS:: $(top_srcdir)/.version $(top_srcdir)/genauthors
+ $(top_srcdir)/genauthors $(top_srcdir)/.version
diff --git a/genauthors b/genauthors
index 1e81db4..87094c7 100755
--- a/genauthors
+++ b/genauthors
@@ -1,7 +1,9 @@
#! /bin/sh
#
# Generate a list of authors from the git repository, it will only
-# actually do anything if a .git file exists.
+# actually do anything if a .git file exists. Run like this:
+#
+# ./genauthors path/to/.version
#
# Note that some authors might have changed their email addresses over
# the course of their contributions to Gnuastro. Fortunately Git has a
@@ -30,12 +32,26 @@
# along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
+
+
+
+# Initial settings:
+set -o nounset # Stop if a variable is not set.
+set -o errexit # Stop if a program returns false.
+
+
+
+
+
# Only do the job if a .git directory exists (recall that this script
# is also present in the tar-ball with no .git directory and might be
# run from there)
if [ ! -d ".git" ]; then exit 0; fi
+
+
+
# Print a status report, since this will be run along with the large
# number of bootstrap operations, it is best to tell the users since
# it might take a few seconds.
@@ -43,14 +59,20 @@ echo "Generating AUTHORS from the version controlled
source..."
+
+
+
# Print the top of the AUTHORS file:
+gnuastroversion=$(cat $1)
echo "GNU Astronomy Utilities authors
===============================
-List of authors (and their relative contribution) the current release
-of GNU Astronomy Utilities (Gnuastro). The relative contribution is
-measured by the number of commits registered to the author in the
-version control history of Gnuastro.
+Version $gnuastroversion
+
+List of authors (and their relative contribution) the current release of
+GNU Astronomy Utilities (Gnuastro). The relative contribution is measured
+by the number of commits registered to the author in the version control
+history of Gnuastro.
The format for each author is: [Number of commits] [Name] [email]
@@ -59,7 +81,7 @@ Aggregate list of all authors
-----------------------------
List of everyone who has made a commit irrespective of which part of
-Gnuastro they contribted to, the rows are ordered alphabetically." > \
+Gnuastro they contributed to, the rows are ordered alphabetically." > \
AUTHORS