From: Wayne Davison Date: Fri, 12 Jun 2020 15:42:59 +0000 (-0700) Subject: Improve how the help lines are harvested from the md file. X-Git-Tag: v3.2.0pre1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3437244b56c4d74effe437702c1b6a8dc7b3cb9;p=thirdparty%2Frsync.git Improve how the help lines are harvested from the md file. --- diff --git a/Makefile.in b/Makefile.in index 7cf73a38..f6dd515b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -103,25 +103,15 @@ options.o: latest-year.h help-rsync.h help-rsyncd.h flist.o: rounding.h -help-rsync.h: rsync.1.md - @sed -e '1,/^# OPTIONS SUMMARY/d' \ - -e '1,/^```/d' \ - -e '/^```/,$$d' \ - -e 's/"/\\"/g' \ - -e 's/^/ rprintf(F,"/' \ - -e 's/$$/\\n");/' \ - <"$(srcdir)/$<" >$@ - -help-rsyncd.h: rsync.1.md - @sed -e '1,/^# OPTIONS SUMMARY/d' \ - -e '1,/^```/d' \ - -e '1,/^```/d' \ +help-rsync.h help-rsyncd.h: rsync.1.md + @sed -e '1,/^\[comment\].*$@/d' \ -e '1,/^```/d' \ -e '/^```/,$$d' \ -e 's/"/\\"/g' \ -e 's/^/ rprintf(F,"/' \ -e 's/$$/\\n");/' \ <"$(srcdir)/$<" >$@ + @if ! test -s $@; then rm -f $@ ; echo "The Makefile generated an empty file: $@" ; exit 1 ; fi rounding.h: rounding.c rsync.h proto.h @for r in 0 1 3; do \ diff --git a/rsync.1.md b/rsync.1.md index 47b16acb..0af45bda 100644 --- a/rsync.1.md +++ b/rsync.1.md @@ -322,11 +322,12 @@ I mirror a directory between my "old" and "new" ftp sites with the command: This is launched from cron every few hours. -# OPTIONS SUMMARY +# OPTION SUMMARY Here is a short summary of the options available in rsync. Please refer to the detailed description below for a complete description. +[comment]: # (help-rsync.h) [comment]: # (Keep these short enough that they'll be under 80 chars when indented by 8 chars.) ``` @@ -468,6 +469,8 @@ detailed description below for a complete description. Rsync can also be run as a daemon, in which case the following options are accepted: +[comment]: # (help-rsyncd.h) + ``` --daemon run as an rsync daemon --address=ADDRESS bind to the specified address