]> arthur.barton.de Git - bup.git/blobdiff - dev/prep-for-macos-build
cirrus: fill out python 3 tests
[bup.git] / dev / prep-for-macos-build
index 78ae3a50dc5af52ca5fe6e128cd4f8c81b126f1b..d79fd043abc45a0354e8fa60c6943b05907d7645 100755 (executable)
@@ -1,6 +1,13 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
-set -ex
+set -exu
+
+usage()
+{
+    echo "Usage: prep-for-macos-build [python2|python3]"
+}
+
+pyver="${1:-python2}"
 
 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
 
@@ -11,3 +18,12 @@ brew install par2 readline rsync pkg-config
 # won't actually be able to use the readline we just installed above.
 brew link --force readline
 # "brew unlink readline" will undo this hack
+
+case "$pyver" in
+    python2) ;;
+    python3) brew install python ;;
+    *)
+        usage 1>&2
+        exit 2
+        ;;
+esac