-
Notifications
You must be signed in to change notification settings - Fork 10
/
build-osx.sh
executable file
·39 lines (30 loc) · 959 Bytes
/
build-osx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/bash
# Copyright 2015-2020 Peter Williams <peter@newton.cx>
# Licensed under the MIT License.
# Just Do It script: rebuild a package or packages on OS X.
set -e
recipe_topdir=$(cd $(dirname $0) && pwd)
builder_args=("--python='3.8.* *_cpython'")
# Make sure container is up and running
echo "- Don't forget ./start-vagrant.sh"
vagrant up >/dev/null
# Ready to go.
while [ $# -gt 0 ] ; do
pkg="$1"
shift
if [ ! -d "$recipe_topdir/recipes/$pkg" ] ; then
echo >&2 "error: no such package $pkg"
exit 1
fi
log="$recipe_topdir/recipes/$pkg/osx-64-py3.log"
echo "Building with logs to $log ..."
set +e
stdbuf -oL -eL vagrant ssh -c "cd /vagrant/recipes/ && ./.builder.sh ${builder_args[@]} /vagrant/recipes/$pkg" >"$log" 2>&1
ec=$?
set -e
echo "========================================"
tail -n8 "$log"
echo "========================================"
[ "$ec" -ne 0 ] && exit $ec
done
exit 0