Skip to content

Instantly share code, notes, and snippets.

@mythmon
Created October 30, 2019 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mythmon/abce95b95da794b2ae56594841e8b296 to your computer and use it in GitHub Desktop.
Save mythmon/abce95b95da794b2ae56594841e8b296 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eu
_step=0
function step() {
_step=$(($_step + 1))
echo
echo "######## Step ${_step}:" $@ "########"
}
function manual() {
echo "*" $@
read -p "Press enter when complete"
}
MACH=/home/mythmon/src/mozilla-unified/mach
step "Update mach in mozilla-unified"
manual "Please make sure that $MACH is up to date"
step "Downloading artifact"
$MACH artifact toolchain --from-build linux64-sccache -v
step "Moving artifacts into place"
manual "Please move the artifacts from $(pwd)/sccache to /opt/sccache"
step "Changing ownership of files"
sudo chown sccache:sccache /opt/sccache/*
step "Changing permissions of files"
sudo chmod g+x /opt/sccache/*
step "Restarting service"
sudo systemctl restart sccache-dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment