onionshare/install/build_osx.sh

24 lines
659 B
Bash
Raw Normal View History

#!/bin/bash
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $ROOT
# deleting dist
echo Deleting dist folder
rm -rf $ROOT/dist &>/dev/null 2>&1
# build the .app
echo Building OnionShare.app
pyinstaller install/pyinstaller.spec
if [ "$1" = "--sign" ]; then
SIGNING_IDENTITY_APP="3rd Party Mac Developer Application: Micah Lee"
SIGNING_IDENTITY_INSTALLER="3rd Party Mac Developer Installer: Micah Lee"
# codesign the .app
codesign -vvvv --deep -s "$SIGNING_IDENTITY_APP" dist/OnionShare.app
2015-05-15 21:09:09 -04:00
# build .pkg
productbuild --component dist/OnionShare.app /Applications dist/OnionShare.pkg --sign "$SIGNING_IDENTITY_INSTALLER"
fi