Change-Id: Ic90ebc650b6a89606eaf9e8feafddfe15c44e578 Issue-on: https://github.com/gem5/gem5/issues/254
20 lines
857 B
Bash
20 lines
857 B
Bash
#!/usr/bin/env bash
|
|
|
|
# fail on unset variables and command errors
|
|
set -eu -o pipefail # -x: is for debugging
|
|
|
|
# Install deno
|
|
curl -fsSL https://deno.land/x/install/install.sh | sh
|
|
echo "export PATH=\"\${HOME}/.deno/bin:\${PATH}\"" >> ~/.profile
|
|
echo "export PATH=\"\${HOME}/.deno/bin:\${PATH}\"" >> ~/.bash_profile
|
|
|
|
# Install docker compose
|
|
DOCKER_COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.tag_name')
|
|
mkdir -p "${HOME}/.docker/cli-plugins"
|
|
curl -sL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o "${HOME}/.docker/cli-plugins/docker-compose"
|
|
chmod +x "${HOME}/.docker/cli-plugins/docker-compose"
|
|
|
|
# Setup crontab to run docker prune every 3 hours
|
|
echo "0 */3 * * * docker system prune -af --volumes"> /tmp/cron
|
|
crontab /tmp/cron
|