File: sccache.bash

package info (click to toggle)
rustup 1.27.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,636 kB
  • sloc: sh: 856; python: 233; javascript: 183; makefile: 27
file content (20 lines) | stat: -rw-r--r-- 589 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
set -xe

VERSION=0.2.12
TARGET=x86_64-unknown-linux-musl
# from https://github.com/mozilla/sccache/releases
SHA="26fd04c1273952cc2a0f359a71c8a1857137f0ee3634058b3f4a63b69fc8eb7f"
DL_URL="https://github.com/mozilla/sccache/releases/download"
BIN_DIR=/usr/local/bin
TEMP_DIR=$(mktemp -d)
TAR_NAME="sccache-${VERSION}-${TARGET}.tar.gz"

cd "${TEMP_DIR}"
mkdir -p "${BIN_DIR}"

curl -sSL -O "${DL_URL}/${VERSION}/${TAR_NAME}"
echo "${SHA}  ${TAR_NAME}" | sha256sum --check -
tar -xzf "${TAR_NAME}" --strip-components 1
cp sccache "${BIN_DIR}/sccache"
chmod +x "${BIN_DIR}/sccache"