2013-06-16 03:13:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Quick and dangerous script for building OSX binaries.
|
|
|
|
|
2013-08-24 22:28:15 +00:00
|
|
|
# A few quirks to note, which should be re-checked every release:
|
|
|
|
# - We require the latest development version of PyInstaller.
|
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
# To run, first install netlib and mitmproxy, then run
|
|
|
|
#
|
|
|
|
# ./release/osx-binaries
|
|
|
|
#
|
|
|
|
# From the top-level mitmproxy directory.
|
2013-08-24 22:28:15 +00:00
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
usage ()
|
|
|
|
{
|
|
|
|
echo 'Usage : ./release/osx-binaries /path/to/pyinstaller.py'
|
|
|
|
echo 'Run from the top-level mitmproxy directory'
|
|
|
|
exit
|
|
|
|
}
|
2013-06-16 03:13:28 +00:00
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
if [ "$1" = "" ]
|
|
|
|
then
|
|
|
|
usage
|
|
|
|
fi
|
2013-06-16 03:50:08 +00:00
|
|
|
|
2013-06-16 03:13:28 +00:00
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
TMPDIR=./tmp
|
|
|
|
PYINST_CMD=$1" -F --clean"
|
2013-06-16 03:50:08 +00:00
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
rm -f dist/*
|
|
|
|
rm -rf $TMPDIR
|
2013-06-16 03:13:28 +00:00
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
$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
|
2014-12-28 02:07:44 +00:00
|
|
|
|
|
|
|
cd $TMPDIR
|
2014-12-28 23:45:38 +00:00
|
|
|
tar -czvf $DST.tar.gz $DST
|