Skip to content

Commit 521c988

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7604222 commit 521c988

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

Documentation/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,9 @@ user-manual.html: user-manual.xml $(XSLT)
398398
git.info: user-manual.texi
399399
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi
400400

401-
user-manual.texi: user-manual.xml
401+
user-manual.texi: user-manual.xml fix-texi.sh
402402
$(QUIET_DB2TEXI)$(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@+ && \
403-
$(PERL_PATH) fix-texi.perl <$@+ >$@ && \
403+
$(SHELL_PATH) fix-texi.sh <$@+ >$@ && \
404404
$(RM) $@+
405405

406406
user-manual.pdf: user-manual.xml

Documentation/fix-texi.perl

Lines changed: 0 additions & 15 deletions
This file was deleted.

Documentation/fix-texi.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
'

0 commit comments

Comments
 (0)