From 42a4e4fc72b0061792d87590681d491fe3245721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Sat, 29 Jul 2017 18:16:58 +0000 Subject: [PATCH] better support for README.md; timeout for svn2cl and git2cl --- scripts/ax_init_standard_project.m4 | 2 +- scripts/bootstrap.sh | 43 +++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index fed547e..a71a1bc 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -171,7 +171,7 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AX_SUBST(HOME) if test -f README.md; then README=$(tail -n +3 README.md) - DESCRIPTION=$(head -1 README.md) + DESCRIPTION=$(head -1 README.md | sed 's,^#\+ *,,;s, *#\+$,,') else README=$(tail -n +3 README) DESCRIPTION=$(head -1 README) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 7cc6a29..58408c1 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -143,7 +143,7 @@ GENERATED FILES * test/runtests.sh - template file to run test scripts, i.e. docker based * AUTHORS - replace your name in AUTHORS before first run * NEWS - empty file add your project's news - * README - add project description (first line is header, followed by an empty line) + * README (or README.md) - add project description (first line: header, followed by empty line) * configure.ac - global configuration file template * makefile.am - global makefile template * ${DEFAULT_PROJECT_NAME}.desktop.in - linux desktop file @@ -514,13 +514,18 @@ vcs2cl() { else touch "ChangeLog" fi + if test -x $(which timeout); then + local TIMEOUT="timeout 10" + else + local TIMEOUT= + fi if test -x $(which ${VCS}2cl); then if test "${VCS}" = "git"; then - ${VCS}2cl > ChangeLog + $TIMEOUT ${VCS}2cl || true > ChangeLog elif test "${VCS}" = "svn"; then - ${VCS}2cl --break-before-msg -a -i + $TIMEOUT ${VCS}2cl --break-before-msg -a -i || true elif test -n "${VCS}"; then - ${VCS}2cl + $TIMEOUT ${VCS}2cl || true fi fi if test $exists -eq 0; then @@ -563,11 +568,18 @@ EOF to NEWS < - $(head -1 README) + $DESCRIPTION -

$(head -1 README)

+

$DESCRIPTION

generated by bootstrap, please edit

@@ -1575,7 +1587,7 @@ EOF2 EOF to debian/docs <