]> arthur.barton.de Git - bup.git/blob - dev/prep-for-macos-build
prep-for-macos-build: update brew install command
[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/HEAD/install.sh)"
13
14 brew update
15 brew install par2 readline rsync pkg-config md5sha1sum
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         easy_install-2.7 --user pip
25         /Users/anka/Library/Python/2.7/bin/pip install --user pytest pytest-xdist
26         ;;
27     python3)
28         brew install python
29         easy_install --user pip
30         pip3 install --user pytest pytest-xdist
31         ;;
32     *)
33         usage 1>&2
34         exit 2
35         ;;
36 esac