]> arthur.barton.de Git - bup.git/blob - dev/prep-for-macos-build
cirrus: allow failures on macos with python 2
[bup.git] / dev / prep-for-macos-build
1 #!/usr/bin/env bash
2
3 set -exu
4
5 usage()
6 {
7     echo "Usage: prep-for-macos-build [python2|python3]"
8 }
9
10 pyver="${1:-python2}"
11
12 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
13
14 brew update
15 brew install par2 readline rsync pkg-config
16
17 # This avoid's macos interference, i.e. without this it looks like we
18 # won't actually be able to use the readline we just installed above.
19 brew link --force readline
20 # "brew unlink readline" will undo this hack
21
22 case "$pyver" in
23     python2) ;;
24     python3) brew install python ;;
25     *)
26         usage 1>&2
27         exit 2
28         ;;
29 esac