-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.html
73 lines (73 loc) · 4.39 KB
/
INSTALL.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<html lang="en-US">
<head>
<title>CMTools</title>
<link rel="stylesheet" href="/css/site.css">
</head>
<body>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="index.html">README</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="about.html">About</a></li>
<li><a href="search.html">Search</a></li>
<li><a href="https://github.com/caltechlibrary/CMTools">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="installation-for-development-of-cmtools">Installation for
development of <strong>CMTools</strong></h1>
<p><strong>CMTools</strong> is an experimental, proof of concept, set of
tools for TypeScript, JavaScript, Python or Go programming projects. It
provides a <code>cmt</code> command line program.</p>
<h2 id="quick-install-with-curl-or-irm">Quick install with curl or
irm</h2>
<p>There is an experimental installer.sh script that can be run with the
following command to install latest table release. This may work for
macOS, Linux and if you’re using Windows with the Unix subsystem. This
would be run from your shell (e.g. Terminal on macOS).</p>
<pre class="shell"><code>curl https://caltechlibrary.github.io/CMTools/installer.sh | sh</code></pre>
<p>This will install <code>cmt</code> in your <code>$HOME/bin</code>
directory.</p>
<p>If you are running Windows 10 or 11 use the Powershell command
below.</p>
<div class="sourceCode" id="cb2"><pre
class="sourceCode ps1"><code class="sourceCode powershell"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">irm</span> https<span class="op">://</span>caltechlibrary<span class="op">.</span><span class="fu">github</span><span class="op">.</span><span class="fu">io</span><span class="op">/</span>CMTools<span class="op">/</span>installer<span class="op">.</span><span class="fu">ps1</span> <span class="op">|</span> <span class="fu">iex</span></span></code></pre></div>
<h2 id="installing-from-source">Installing from source</h2>
<h3 id="required-software">Required software</h3>
<ol type="1">
<li>Git (to clone the cold repository on GitHub)</li>
<li>Deno >= 2.1.4</li>
</ol>
<h3 id="compiling-cmtools">Compiling <strong>CMTools</strong></h3>
<p>Deno is used to compile the TypeScript and dependent JavaScript files
into an executable.</p>
<ol type="1">
<li>Install handlebars via Deno</li>
<li>Use Deno’s task to build project</li>
</ol>
<pre class="shell"><code>deno install npm:handlebars
deno task build</code></pre>
<p>This will provide the <code>cmt</code> command in the “bin” folder in
your repository directory.</p>
<p>You can check to make sure <code>cmt</code> works for your system.
The compiled version is self contain and can be copied someplace in your
path.</p>
<h3 id="manual-install-on-posix">Manual install on POSIX</h3>
<pre class="shell"><code>mkdir -p $HOME/bin
export PATH="$HOME/bin:$PATH"
cp bin/cmt $HOME/bin/
export MANPATH="$MANPATH:$HOME/man"
cp -vR man $HOME/</code></pre>
<h3 id="manual-install-for-windows-via-powershell">Manual install for
Windows via Powershell</h3>
<div class="sourceCode" id="cb5"><pre
class="sourceCode ps1"><code class="sourceCode powershell"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>mkdir <span class="va">$HOME</span><span class="op">/</span>bin</span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="va">$PATH</span> <span class="op">=</span> <span class="op">[</span>Environment<span class="op">]::</span>GetEnvironmentVariable<span class="op">(</span><span class="st">"PATH"</span><span class="op">)</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="op">[</span>Environment<span class="op">]::</span>SetEnvironmentVariable<span class="op">(</span><span class="st">"PATH"</span><span class="op">,</span> <span class="st">"</span><span class="va">$PATH</span><span class="st">;</span><span class="va">$HOME</span><span class="st">/bin"</span><span class="op">)</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="fu">copy</span> <span class="op">./</span>bin<span class="op">/</span>cmt<span class="op">.</span><span class="fu">exe</span> <span class="va">$HOME</span><span class="op">/</span>bin<span class="op">/</span></span></code></pre></div>
</section>
</body>
</html>