Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: build-aux/manconv.sh

Issue 7109015: Update XZ Utils to 5.0.3 (in deps) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « TODO ('k') | build-aux/version.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/bin/sh
2 #
3 ###############################################################################
4 #
5 # Wrapper for GNU groff to convert man pages to a few formats
6 #
7 # Usage: manconv.sh FORMAT [PAPER_SIZE] < in.1 > out.suffix
8 #
9 # FORMAT can be ascii, utf8, ps, or pdf. PAPER_SIZE can be anything that
10 # groff accepts, e.g. a4 or letter. See groff_font(5). PAPER_SIZE defaults
11 # to a4 and is used only when FORMAT is ps (PostScript) or pdf.
12 #
13 # Multiple man pages can be given at once e.g. to create a single PDF file
14 # with continuous page numbering.
15 #
16 ###############################################################################
17 #
18 # Author: Lasse Collin
19 #
20 # This file has been put into the public domain.
21 # You can do whatever you want with this file.
22 #
23 ###############################################################################
24
25 FORMAT=$1
26 PAPER=${2-a4}
27
28 # Make PostScript and PDF output more readable:
29 # - Use 11 pt font instead of the default 10 pt.
30 # - Use larger paragraph spacing than the default 0.4v (man(7) only).
31 FONT=11
32 PD=0.8
33
34 SED_PD="
35 /^\\.TH /s/\$/\\
36 .PD $PD/
37 s/^\\.PD\$/.PD $PD/"
38
39 case $FORMAT in
40 ascii)
41 groff -t -mandoc -Tascii | col -bx
42 ;;
43 utf8)
44 groff -t -mandoc -Tutf8 | col -bx
45 ;;
46 ps)
47 sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
48 -rC1 -rS$FONT -Tps -P-p$PAPER
49 ;;
50 pdf)
51 sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
52 -rC1 -rS$FONT -Tps -P-p$PAPER | ps2pdf - -
53 ;;
54 *)
55 echo 'Invalid arguments' >&2
56 exit 1
57 ;;
58 esac
OLDNEW
« no previous file with comments | « TODO ('k') | build-aux/version.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698