Skip to content

Commit 6b2e52b

Browse files
authored
scripts: restore provision_mac.sh (removed in #1275) and remove docker scripts (#1299)
* Fixes #1297.
2 parents be24dbd + 2de4514 commit 6b2e52b

File tree

6 files changed

+32
-120
lines changed

6 files changed

+32
-120
lines changed

docker/.dockerignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

docker/Dockerfile

Lines changed: 0 additions & 40 deletions
This file was deleted.

docker/README.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

docker/docker_exec.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

docker/docker_run.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

scripts/provision_mac.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# complain if we're not on macOS
4+
UNAME=$(uname -s)
5+
if [ "$UNAME" != "Darwin" ]; then
6+
echo >&2 "Run this script on a macOS host."; exit 1;
7+
fi
8+
9+
# make sure we have all prerequisites
10+
prereqs=(brew clang)
11+
for prereq in "${prereqs[@]}"; do
12+
type -P "$prereq" >/dev/null || {
13+
echo >&2 "$prereq not in path."; exit 1;
14+
}
15+
done
16+
17+
SCRIPT_DIR="$(dirname "$0")"
18+
export HOMEBREW_NO_AUTO_UPDATE=1
19+
20+
# NOTE: Pin LLVM to a known good version since new releases
21+
# tend not to be backwards compatible
22+
# `bash` needed b/c macOS ships with bash 3, which doesn't support arrays properly
23+
brew install -q python cmake ninja gpg llvm@17 bash
24+
25+
# Python 3 packages
26+
python3 -m pip install --user --upgrade pip
27+
python3 -m pip install --user -r "$SCRIPT_DIR/requirements.txt"
28+
29+
# Rust and dependencies
30+
RUST_TOOLCHAIN_FILE="$SCRIPT_DIR/../rust-toolchain.toml"
31+
export RUST_VER=$($SCRIPT_DIR/query_toml.py toolchain.channel $RUST_TOOLCHAIN_FILE)
32+
"$SCRIPT_DIR/provision_rust.sh"

0 commit comments

Comments
 (0)