mitmproxy/release/osx-binaries
Aldo Cortesi e4f510685e Generalize binary building, add static resources, add spec files for mitmproxy, mitmdump and mitmweb
We're now ready to use the same script (more or less) to build Windows
binaries.
2014-12-28 17:39:44 +13:00

50 lines
1003 B
Bash
Executable File

#!/bin/sh
# Quick and dangerous script for building OSX binaries.
# A few quirks to note, which should be re-checked every release:
# - We require the latest development version of PyInstaller.
# To run, first install netlib and mitmproxy, then run
#
# ./release/osx-binaries
#
# From the top-level mitmproxy directory.
usage ()
{
echo 'Usage : ./release/osx-binaries /path/to/pyinstaller.py'
echo 'Run from the top-level mitmproxy directory'
exit
}
if [ "$1" = "" ]
then
usage
fi
TMPDIR=./tmp
PYINST_CMD=$1" -F --clean"
rm -f dist/*
rm -rf $TMPDIR
$PYINST_CMD ./release/mitmdump.spec
./dist/mitmdump --version || exit 1
$PYINST_CMD ./release/mitmproxy.spec
./dist/mitmproxy --version || exit 1
$PYINST_CMD ./release/mitmweb.spec
./dist/mitmweb --version || exit 1
DST=osx-mitmproxy-`./dist/mitmdump --shortversion 2>&1`
mkdir -p $TMPDIR/$DST
cp ./dist/mitmproxy $TMPDIR/$DST
cp ./dist/mitmdump $TMPDIR/$DST
cshape ./doc-src $TMPDIR/$DST/doc
cd $TMPDIR
tar -czvf $DST.tgz $DST