Git fork

Documentation: stop depending on Perl to massage user manual

The "fix-texi.perl" script is used to fix up the output of
`docbook2x-texi`:

- It changes the filename to be "git.info".

- It changes the directory category and entry.

The script is written in Perl, but it can be rather trivially converted
to a shell script. Do so to remove the dependency on Perl for building
the user manual.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Patrick Steinhardt and committed by
Junio C Hamano
521c9884 76042228

+23 -17
+2 -2
Documentation/Makefile
··· 398 git.info: user-manual.texi 399 $(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi 400 401 - user-manual.texi: user-manual.xml 402 $(QUIET_DB2TEXI)$(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@+ && \ 403 - $(PERL_PATH) fix-texi.perl <$@+ >$@ && \ 404 $(RM) $@+ 405 406 user-manual.pdf: user-manual.xml
··· 398 git.info: user-manual.texi 399 $(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi 400 401 + user-manual.texi: user-manual.xml fix-texi.sh 402 $(QUIET_DB2TEXI)$(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@+ && \ 403 + $(SHELL_PATH) fix-texi.sh <$@+ >$@ && \ 404 $(RM) $@+ 405 406 user-manual.pdf: user-manual.xml
-15
Documentation/fix-texi.perl
··· 1 - #!/usr/bin/perl -w 2 - 3 - while (<>) { 4 - if (/^\@setfilename/) { 5 - $_ = "\@setfilename git.info\n"; 6 - } elsif (/^\@direntry/) { 7 - print '@dircategory Development 8 - @direntry 9 - * Git: (git). A fast distributed revision control system 10 - @end direntry 11 - '; } 12 - unless (/^\@direntry/../^\@end direntry/) { 13 - print; 14 - } 15 - }
···
+21
Documentation/fix-texi.sh
···
··· 1 + #!/bin/sh 2 + 3 + awk ' 4 + /^@setfilename/{ 5 + print "@setfilename git.info" 6 + next 7 + } 8 + /^@direntry/{ 9 + direntry=1 10 + print "@dircategory Development" 11 + print "@direntry" 12 + print "* Git: (git). A fast distributed revision control system" 13 + print "@end direntry" 14 + next 15 + } 16 + /^@end direntry/{ 17 + direntry=0 18 + next 19 + } 20 + !direntry 21 + '