This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/_install-sccache

16 lines
426 B
Bash
Executable File

#!/bin/sh
set -ex
REPO=https://github.com/mozilla/sccache
VERSION=v0.2.15
TARFILENAME="sccache-$VERSION-x86_64-unknown-linux-musl"
TARFILEPATH="$HOME/.cache/$TARFILENAME.tar.gz"
BINDIR="$HOME/.local/bin"
test -f "$TARFILEPATH" ||
wget -qO "$TARFILEPATH" "$REPO/releases/download/$VERSION/$TARFILENAME.tar.gz"
tar -xf "$TARFILEPATH" -C "$BINDIR" --wildcards "*/sccache" --strip-components=1
chmod u+x "$BINDIR/sccache"