1#!/bin/bash 2 3REV=7979016aff545f7b41cc517031026020b340989d 4 5set -euo pipefail 6cd "$(dirname "${BASH_SOURCE[0]}")" 7mkdir -p rust 8touch rust/COMMIT 9 10if [ "$(cat rust/COMMIT)" != "$REV" ]; then 11 rm -rf rust 12 mkdir rust 13 curl -L "https://github.com/rust-lang/rust/archive/${REV}.tar.gz" \ 14 | tar xz --directory rust --strip-components 1 15 echo "$REV" > rust/COMMIT 16fi 17