installing-via-homebrew.dita 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <task id="installing-via-homebrew">
  5. <title>Installing on macOS via Homebrew</title>
  6. <titlealts>
  7. <navtitle>Installing via Homebrew</navtitle>
  8. </titlealts>
  9. <shortdesc>An alternative installation method can be used to install DITA-OT on macOS via <xref keyref="homebrew"/>,
  10. the platform’s most popular open-source package manager.</shortdesc>
  11. <prolog>
  12. <metadata>
  13. <keywords>
  14. <indexterm>macOS</indexterm>
  15. <indexterm><cmdname>dita</cmdname> command<indexterm>Homebrew</indexterm></indexterm>
  16. <indexterm>installing<indexterm>Homebrew</indexterm></indexterm>
  17. </keywords>
  18. </metadata>
  19. </prolog>
  20. <taskbody>
  21. <prereq>
  22. <p>The steps below assume you have already installed <xref keyref="homebrew"/> according to the instructions at
  23. <xref keyref="homebrew">brew.sh</xref>.</p>
  24. <note type="tip">Verify that your <varname>PATH</varname> environment begins with
  25. <filepath>/usr/local/bin</filepath> to ensure that Homebrew-installed software takes precedence over any
  26. programs of the same name elsewhere on the system.</note>
  27. </prereq>
  28. <steps>
  29. <step>
  30. <cmd>Update Homebrew to make sure the latest package formulas are available on your system:</cmd>
  31. <stepxmp><codeblock>$ <cmdname>brew update</cmdname>
  32. Already up-to-date.</codeblock></stepxmp>
  33. <stepresult>
  34. <p>Homebrew responds with a list of any new or updated formulæ.</p></stepresult>
  35. </step>
  36. <step importance="optional">
  37. <cmd>Check the version of DITA-OT that is available from Homebrew:</cmd>
  38. <stepxmp><codeblock>$ <cmdname>brew info dita-ot</cmdname>
  39. <systemoutput>dita-ot: stable <keyword keyref="maintenance-version"/>
  40. DITA Open Toolkit is an implementation of the OASIS DITA specification
  41. https://www.dita-ot.org/
  42. /usr/local/Cellar/dita-ot/<keyword keyref="maintenance-version"/> (<varname>number of files</varname>, <varname>package size</varname>) *
  43. Built from source on <varname>YYYY-MM-DD</varname> at <varname>hh:mm:ss</varname>
  44. From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/dita-ot.rb
  45. ==> Requirements
  46. Required: java >= 1.8 ✔</systemoutput>
  47. </codeblock></stepxmp>
  48. <stepresult>
  49. <p>The version of the DITA-OT formula is shown, along with basic information on the package.</p></stepresult>
  50. </step>
  51. <step>
  52. <cmd>Install the <codeph>dita-ot</codeph> package:</cmd>
  53. <stepxmp><codeblock>$ <cmdname>brew install dita-ot</cmdname>
  54. <systemoutput>Downloading…</systemoutput></codeblock></stepxmp>
  55. <stepresult>
  56. <p>Homebrew will automatically download the latest version of the toolkit, install it in a subfolder of the
  57. local package Cellar and symlink the <cmdname>dita</cmdname> command to
  58. <filepath>/usr/local/bin/dita</filepath>.</p></stepresult>
  59. </step>
  60. <step importance="optional">
  61. <cmd>Verify the installation:</cmd>
  62. <stepxmp><codeblock>$ <cmdname>which dita</cmdname>
  63. <systemoutput>/usr/local/bin/dita</systemoutput></codeblock></stepxmp>
  64. <stepresult>
  65. <p>The response confirms that the system will use the Homebrew-installed version of DITA-OT.</p></stepresult>
  66. </step>
  67. <step importance="optional">
  68. <cmd>Check the DITA-OT version number:</cmd>
  69. <stepxmp><codeblock>$ <cmdname>dita</cmdname> <parmname>--version</parmname>
  70. <systemoutput>DITA-OT version <keyword keyref="maintenance-version"/></systemoutput></codeblock></stepxmp>
  71. <stepresult>The DITA-OT version number appears on the console.</stepresult>
  72. </step>
  73. </steps>
  74. <result>
  75. <p>You can now run the <cmdname>dita</cmdname> command to transform DITA content.</p></result>
  76. </taskbody>
  77. </task>