boinc/mac_installer/postinstall

36 lines
1.1 KiB
Plaintext
Raw Normal View History

#!/bin/sh
##
# post-Install Script for Macintosh BOINC Manager for OS X revised 7/2/15
##
echo "Starting BOINC postinstall script"
echo "initial directory = $PWD"
echo "argument 1 = $1"
# Copy acct_mgr_url.xml into BOINC Data directory here so it won't be
# deleted if user later runs standard BOINC installer
if [ -f "Contents/Resources/acct_mgr_url.xml" ]; then
cp -fp Contents/Resources/acct_mgr_url.xml "/Library/Application Support/BOINC Data/acct_mgr_url.xml"
fi
rm -f /tmp/BOINCInstallLog.txt
pipath=`echo $1 | sed -e "s/BOINC.pkg/PostInstall.app/"`
## echo "pi path = $pipath" >> /tmp/BOINCInstallLog.txt
# Run the Postinstall Application
if [ "${COMMAND_LINE_INSTALL}" = "1" ]; then
"$pipath/Contents/MacOS/PostInstall" -part1 >> /tmp/BOINCInstallLog.txt
sleep 2
"$pipath/Contents/MacOS/PostInstall" -part2 >> /tmp/BOINCInstallLog.txt &
else
"$pipath/Contents/MacOS/PostInstall" -part1
sleep 2
# part2 continues to run after Installer finishes,
# and fails unless we redirect stdout to a file
"$pipath/Contents/MacOS/PostInstall" -part2 >> /tmp/BOINCInstallLog.txt &
fi
exit 0