install-info.8 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. .\" Install-info and this manpage are Copyright © 1994 by Ian Jackson.
  2. .\"
  3. .\" This is free software; see the GNU General Public Licence version 2
  4. .\" or later for copying conditions. There is NO warranty.
  5. .TH install\-info 8 "2008-08-18" "Debian Project" "dpkg utilities"
  6. .SH NAME
  7. install\-info \- create or update entry in Info dir file
  8. .
  9. .SH SYNOPSIS
  10. .B install\-info
  11. .RB [ \-\-version ]
  12. .RB [ \-\-help ]
  13. .RB [ \-\-debug ]
  14. .RB [ \-\-maxwidth=\fInnn\fP ]
  15. .RB [ "\-\-section \fIregexp\fP \fItitle\fP" ]
  16. .RB [ \-\-infodir=\fIxxx\fP ]
  17. .RB [ \-\-align=\fInnn\fP ]
  18. .RB [ \-\-quiet ]
  19. .RB [ \-\-menuentry=\fIxxx\fP ]
  20. .RB [ \-\-description=\fIxxx\fP ]
  21. .RB [ \-\-remove | \-\-remove\-exactly ]
  22. .RB [ \-\- ]
  23. .I filename
  24. .
  25. .SH DESCRIPTION
  26. .B install\-info
  27. creates, updates or removes entries in the Info
  28. .B dir
  29. file. When updating or creating entries, if no description is
  30. specified on the command line or in the Info file, it attempts to guess
  31. a description from the contents of the file.
  32. .PP
  33. See the description of the
  34. .B \-\-section
  35. option for details of where the entry will be placed and a description
  36. of the expected format of the
  37. .B dir
  38. file.
  39. .SH OPTIONS
  40. .TP
  41. .BI "[\-\-] " filename
  42. Gives the filename of the Info file whose menu entry is to be created,
  43. updated or removed. If
  44. .B \-\-remove\-exactly
  45. is specified, then
  46. .I filename
  47. should be the exact entry name to be removed (e.g. "emacs\-20/emacs" or
  48. "gcc"), otherwise the basename of this filename is used as the
  49. referent of the menu entry which is created, unless there's an
  50. overriding START-INFO-DIR entry inside the given file. This file must
  51. therefore exist (or be about to be installed, or have previously
  52. existed when removing an entry) in the same directory as the
  53. .B dir
  54. file (see the
  55. .B \-\-infodir
  56. option).
  57. If
  58. .I filename
  59. ends in \fB.gz\fP, it is taken to refer to a file compressed with \fBgzip\fP;
  60. if it doesn't exist, but a corresponding
  61. .IB filename .gz
  62. does, the latter is used instead.
  63. When adding or updating entries, the file must exist at the path
  64. specified (possibly with an additional
  65. .B .gz
  66. extension).
  67. .TP
  68. .B \-\-remove
  69. Specifies that the entry for the file
  70. .I filename
  71. is to be removed; by default entries are created or updated.
  72. If the removal results in a section becoming empty, the section heading
  73. (and the spare blank line) will be removed as well, unless this is the
  74. last section in the file or
  75. .B \-\-keep\-old
  76. is specified. See the
  77. .B \-\-section
  78. option for details about the expected format of the
  79. .B dir
  80. file.
  81. If there are several suitable entries in the
  82. .B dir
  83. file, only those in the first matching contiguous group will be removed
  84. and the others silently ignored.
  85. It is not an error for no suitable entry to be found, though
  86. .B install\-info
  87. will issue a warning unless the
  88. .B \-\-quiet
  89. option was specified.
  90. When
  91. .B \-\-remove
  92. is specified the
  93. .BR \-\-maxwidth ", " \-\-align " and " \-\-calign
  94. formatting options are silently ignored.
  95. .TP
  96. .B \-\-remove\-exactly
  97. This option is essentially the same as
  98. .B \-\-remove
  99. except that
  100. .I filename
  101. is taken as the exact entry to be removed, rather than as the name
  102. of an existing file. This can be important when trying to remove
  103. entries that refer to info files in subdirectories
  104. (e.g. "emacs\-20/emacs") because
  105. .B \-\-remove
  106. will operate on the basename of the given
  107. .I filename
  108. rather than the exact name given. (i.e.
  109. .B \-\-remove
  110. "emacs\-20/emacs" would cause
  111. .B install\-info
  112. to look for "emacs", not "emacs\-20/emacs").
  113. .TP
  114. .BI "\-\-section " "regexp title"
  115. Specifies that if a new entry is to be made, it should be placed in a
  116. section of the
  117. .B dir
  118. file whose title matches
  119. .IR regexp .
  120. If no such section exists, one will be created as the second to last
  121. section in the file (see below) with title
  122. .IR title .
  123. A section is a part of the
  124. .B dir
  125. menu delimited by blank lines; the first line is assumed to be the
  126. title.
  127. If a new entry is to be created,
  128. .B install\-info
  129. will attempt to insert it within the section in alphabetic order. If
  130. the entries in the section aren't already sorted, the new location
  131. within the section will be unpredictable. The order of existing
  132. entries will not be changed.
  133. If the
  134. .B \-\-section
  135. option is not specified,
  136. .B install\-info
  137. will look for a title in the Info file itself by looking for an entry
  138. of the form
  139. .br
  140. .BI "INFO\-DIR\-SECTION" " title"
  141. .br
  142. If no section title is found, the default is to append new entries to
  143. the end of the file. The last section (even if it only consists of the
  144. title line) should always exist to ensure that new sections are
  145. created in the right place. The final section should be titled to
  146. reflect the fact that Info files with no better specified location
  147. are appended to it.
  148. If there is already an entry for the Info file being installed, it is
  149. replaced in situ with the new entry.
  150. If a section is specified when removing an entry, the section is
  151. ignored and a warning is issued.
  152. If a section is requested when adding an entry, but the file contains
  153. no section headings at all, then
  154. .B install\-info
  155. will create both the requested section and a Miscellaneous section at
  156. the end of the file.
  157. .TP
  158. .BI \-\-infodir= infodir
  159. Specifies that the
  160. .B dir
  161. file is, and the installed copy of the new Info file was, is or will
  162. be located in
  163. .IR infodir .
  164. The default is
  165. .BR /usr/share/info/ .
  166. .TP
  167. .BI \-\-align= nnn " [deprecated]"
  168. Specifies that the first line of the description should be indented at
  169. least
  170. .I nnn
  171. characters; extra spaces will be added as required. If necessary
  172. because of the length of the
  173. .B dir
  174. menu entry details, it may be offset more. The default is 27.
  175. .TP
  176. .BI \-\-calign= nnn " [deprecated]"
  177. Specifies that the second and subsequent lines of the description
  178. should be indented at least
  179. .I nnn
  180. characters. The default is 29.
  181. .TP
  182. .BI \-\-maxwidth= nnn " [deprecated]"
  183. Specifies that the maximum width for the Info file is
  184. .IR nnn .
  185. This is used when word-wrapping the descriptive text.
  186. The default is 79.
  187. .TP
  188. .B \-\-quiet
  189. Prevents the usual display of the new menu entry just before it is
  190. inserted and of the messages announcing the replacement and removal
  191. of existing entries and the creation and deletion of sections.
  192. .TP
  193. .B \-\-help
  194. Causes
  195. .B install\-info
  196. to display its usage information and exit.
  197. .TP
  198. .B \-\-version
  199. Causes
  200. .B install\-info
  201. to display its version and copyright information and exit.
  202. .TP
  203. .BI \-\-description= xxx
  204. Specifies that the description to use after the menu entry in new or
  205. updated entries be
  206. .IR xxx .
  207. The default is to use the the value specified in the Info file itself;
  208. this is found by searching for a section of the form
  209. .br
  210. .B START\-INFO\-DIR\-ENTRY
  211. .br
  212. .B * Auto-PGP: (auto-pgp). PGP under GNU Emacs.
  213. .br
  214. .B END\-INFO\-DIR\-ENTRY
  215. If the entry found in the Info file itself extends across several
  216. lines, each giving a menu entry, the text found in the file is used
  217. verbatim. In this case, the alphabetic ordering scheme is turned off,
  218. and the entries are inserted at the top of section in question. In
  219. this case, the
  220. .BR \-\-menuentry ", " \-\-maxwidth ", " \-\-align ", " \-\-calign
  221. .RB " and " \-\-menuentry
  222. options are ignored.
  223. If there is no
  224. .B dir
  225. entry in the file, the program will try to find a paragraph early in
  226. the file starting
  227. .BR "this file documents" .
  228. It will capitalise the first character of the remainder, and use that.
  229. It is an error for none of these methods to yield a description.
  230. If a description argument is given when
  231. .B \-\-remove
  232. is specified, it is ignored and a warning is issued.
  233. .TP
  234. .BI \-\-menuentry= xxx
  235. Specifies that the entry in the menu should be
  236. .IR xxx .
  237. The default is to use the the value specified in the Info file itself.
  238. If this is not present, the basename of the Info file is used
  239. .RB "(any " ".info " "is deleted, and the entry is made mixed case)."
  240. See above for details of the format expected for the menu entry in the
  241. Info file.
  242. When removing entries, the value of the
  243. .B \-\-menuentry
  244. option must match the actual menu entry field in the menu item to be
  245. removed (case not significant). If
  246. .B \-\-menuentry
  247. is omitted, no check on the menu entry is done.
  248. .TP
  249. .B \-\-keep\-old
  250. Inhibits the replacement of existing entries and the removal of empty
  251. sections.
  252. If the file being installed already has an entry in the Info \fBdir\fP file,
  253. the old entry will be left alone instead of being replaced; the default is
  254. to overwrite any old entry found with the newly generated one.
  255. If
  256. .BR \-\-remove " is specified, " \-\-keep\-old
  257. will prevent the removal of the section heading which would otherwise
  258. happen if the section is made empty by the removal.
  259. .TP
  260. .B \-\-test
  261. Enables test mode, which inhibits the update of the Info \fBdir\fP file.
  262. .TP
  263. .B \-\-debug
  264. Enables debugging mode, in which the results of some internal
  265. processing steps are shown.
  266. .
  267. .SH "SEE ALSO"
  268. .BR emacs (1),
  269. .BR info (1),
  270. .BR gzip(1).
  271. .SH AUTHOR
  272. Copyright \(co 1994 Ian Jackson
  273. .sp
  274. This is free software; see the GNU General Public Licence version 2 or
  275. later for copying conditions. There is NO WARRANTY.