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.
|
2015-03-12 02:26:21 +00:00
|
|
|
|
|
|
|
# To run, first install netlib and mitmproxy, then run
|
2014-12-28 04:39:44 +00:00
|
|
|
#
|
|
|
|
# ./release/osx-binaries
|
|
|
|
#
|
2015-03-12 02:26:21 +00:00
|
|
|
# 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"
|
2015-03-12 02:26:21 +00:00
|
|
|
CACHE="~/Library/Application Support/pyinstaller"
|
2013-06-16 03:50:08 +00:00
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
rm -f dist/*
|
|
|
|
rm -rf $TMPDIR
|
2015-03-12 02:26:21 +00:00
|
|
|
rm -rf $CACHE
|
2013-06-16 03:13:28 +00:00
|
|
|
|
2014-12-28 04:39:44 +00:00
|
|
|
$PYINST_CMD ./release/mitmdump.spec
|
2015-03-12 02:26:21 +00:00
|
|
|
echo "Running mitmdump..."
|
2014-12-28 04:39:44 +00:00
|
|
|
./dist/mitmdump --version || exit 1
|
|
|
|
|
|
|
|
$PYINST_CMD ./release/mitmproxy.spec
|
2015-03-12 02:26:21 +00:00
|
|
|
echo "Running mitmproxy..."
|
2014-12-28 04:39:44 +00:00
|
|
|
./dist/mitmproxy --version || exit 1
|
|
|
|
|
|
|
|
$PYINST_CMD ./release/mitmweb.spec
|
2015-03-12 02:26:21 +00:00
|
|
|
echo "Running mitmweb..."
|
2014-12-28 04:39:44 +00:00
|
|
|
./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
|