<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>src/ci/scripts/install-sccache.sh - fork/rust @ 1.42.0</title>
<meta name="description" content="src/ci/scripts/install-sccache.sh in fork/rust at 1.42.0.">
<meta property="og:title" content="src/ci/scripts/install-sccache.sh - fork/rust @ 1.42.0">
<meta property="og:description" content="src/ci/scripts/install-sccache.sh in fork/rust at 1.42.0.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="1.42.0" data-tip="b8cedc00407a4c56a3bda1ed605c6fc166655447">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/rust</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/rust</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">bors</span><span class="commit-message" data-commit="b8cedc00407a4c56a3bda1ed605c6fc166655447">Auto merge of #69854 - pietroalbini:stable-next, r=Centril</span><span class="snapshot-sha sha" data-commit="b8cedc00407a4c56a3bda1ed605c6fc166655447">b8cedc00407</span><time datetime="2020-03-09T22:09:51+00:00" title="2020-03-09 22:09:51 +0000">2020-03-09</time></p>
<header class="topbar"><details class="switcher"><summary>1.42.0</summary><div class="menu"><strong>branches</strong><a href="/fork/rust/ref/master/">master</a><strong>tags</strong><a href="/fork/rust/ref/1.39.0/">1.39.0</a><a href="/fork/rust/ref/1.40.0/">1.40.0</a><a href="/fork/rust/ref/1.41.0/">1.41.0</a><a href="/fork/rust/ref/1.41.1/">1.41.1</a><a class="current" href="/fork/rust/ref/1.42.0/">1.42.0</a><a href="/fork/rust/ref/1.43.0/">1.43.0</a><a href="/fork/rust/ref/1.43.1/">1.43.1</a><a href="/fork/rust/ref/1.44.0/">1.44.0</a><a class="all" href="/fork/rust/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/rust/">rust</a> / <a href="/fork/rust/ref/1.42.0/tree/src/">src</a> / <a href="/fork/rust/ref/1.42.0/tree/src/ci/">ci</a> / <a href="/fork/rust/ref/1.42.0/tree/src/ci/scripts/">scripts</a> / <span class="cur">install-sccache.sh</span></nav>
<span class="view-stats"><span>732 B</span><span>20 lines</span></span><span class="actions"><a class="raw" href="/fork/rust/raw/d3c298992254ef3424da236fbbaafceef4fb8e20/src/ci/scripts/install-sccache.sh">raw</a></span></header>
<pre class="code src" data-hl="src/ci/scripts/install-sccache.sh"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text">#!/bin/bash</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"># This script installs sccache on the local machine. Note that we don't install</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text"># sccache on Linux since it's installed elsewhere through all the containers.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text">set -euo pipefail</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text">IFS=$'\n\t'</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text">source &quot;$(cd &quot;$(dirname &quot;$0&quot;)&quot; &amp;&amp; pwd)/../shared.sh&quot;</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text">if isMacOS; then</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text">    curl -fo /usr/local/bin/sccache &quot;${MIRRORS_BASE}/2018-04-02-sccache-x86_64-apple-darwin&quot;</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text">    chmod +x /usr/local/bin/sccache</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text">elif isWindows; then</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text">    mkdir -p sccache</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text">    curl -fo sccache/sccache.exe &quot;${MIRRORS_BASE}/2018-04-26-sccache-x86_64-pc-windows-msvc&quot;</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text">    ciCommandAddPath &quot;$(pwd)/sccache&quot;</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text">fi</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text"># FIXME: we should probably install sccache outside the containers and then</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text"># mount it inside the containers so we can centralize all installation here.</span></span></pre>
</main>
</body>
</html>
