Re: [PATCH] catch asciidoc failures

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

 



On 6/1/07, Martin Waitz <tali@xxxxxxxxxxxxxx> wrote:
On Thu, May 31, 2007 at 11:23:57PM -0700, Scott Lamb wrote:
> If pipefail is available (GNU bash >= 3.00), fail when asciidoc returns
> error rather than possibly later during XSLT.

perhaps we should simply change the pipe ordering to get asciidoc
to the end of the pipeline so that all shells respect its exit code?

For tig I also adopted the nice man page headers git has. However, I have
used  asciidoc attributes provided on the command line avoid having to
use sed. I can make a patch later if nobody beats me. The required changes
are outlined below.

> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -111,6 +111,7 @@ clean:
>
>  %.html : %.txt
>       rm -f $@+ $@
> +     set -o pipefail 2>/dev/null; \
>       $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
>               $(ASCIIDOC_EXTRA) -o - $< | \
>               sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' >$@+

something like (untested):
        sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' $< |
                $(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
                        $(ASCIIDOC_EXTRA) -o $@+ -

More untested stuff. Use -a to define git_version attribute:

$(ASCIIDOC) -b xhtml11 -d manpage -f asciidoc.conf \
                        $(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@ $<

Then change the @@GIT_VERSION@@ symbol in asciidoc.conf to {git_version}.

--
Jonas Fonseca
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux