Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00061.html>.
* MODULES.html.sh: In a git-less tarball, use the date of the first
ChangeLog entry.
+2020-04-10 Bruno Haible <bruno@clisp.org>
+
+ MODULES.html.sh: Support for reproducible builds from git-less tarballs.
+ Reported by Bernhard M. Wiedemann <bwiedemann@suse.de> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-03/msg00061.html>.
+ * MODULES.html.sh: In a git-less tarball, use the date of the first
+ ChangeLog entry.
+
2020-04-04 Bruno Haible <bruno@clisp.org>
Fix comments: The gettext library is under LGPL 2.1, not LGPL 2.0.
func_end UL
func_echo '<HR>'
-git_checkout_date=`git log -n 1 --date=iso --format=fuller | sed -n -e 's/^CommitDate: //p'`
+git_checkout_date=`if test -d .git; then
+ git log -n 1 --date=iso --format=fuller | sed -n -e 's/^CommitDate: //p';
+ else
+ sed -n -e 's/^\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\).*/\1/p' -e 1q ChangeLog;
+ fi`
pretty_date=`LC_ALL=C date +"%e %B %Y" --date="$git_checkout_date"`
func_echo "Generated by <CODE>MODULES.html.sh</CODE> from a git checkout as of ${pretty_date}."