2007-07-11 09:51:41 +00:00
|
|
|
#!/bin/sh
|
2005-04-27 12:59:53 +00:00
|
|
|
|
|
|
|
##
|
2015-07-02 11:24:16 +00:00
|
|
|
# post-Install Script for Macintosh BOINC Manager for OS X revised 7/2/15
|
2005-04-27 12:59:53 +00:00
|
|
|
##
|
|
|
|
|
2014-03-10 10:30:26 +00:00
|
|
|
echo "Starting BOINC postinstall script"
|
2007-02-20 01:39:26 +00:00
|
|
|
echo "initial directory = $PWD"
|
|
|
|
echo "argument 1 = $1"
|
|
|
|
|
2023-05-05 18:05:20 +00:00
|
|
|
# Copy acct_mgr_url.xml into BOINC Data directory here so it won't be
|
2010-02-10 10:40:58 +00:00
|
|
|
# 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
|
|
|
|
|
2015-07-02 11:24:16 +00:00
|
|
|
rm -f /tmp/BOINCInstallLog.txt
|
|
|
|
|
2015-07-03 01:09:15 +00:00
|
|
|
# PostInstall.app is in the same directory as the package (BOINC.pkg or GridRepublic.pkg, etc.)
|
|
|
|
pipath=`dirname "$1"`/PostInstall.app/Contents/MacOS/PostInstall
|
|
|
|
echo "PostInstall.app path = $pipath"
|
2015-07-02 11:24:16 +00:00
|
|
|
|
2011-10-26 12:12:31 +00:00
|
|
|
# Run the Postinstall Application
|
2010-11-22 13:36:38 +00:00
|
|
|
if [ "${COMMAND_LINE_INSTALL}" = "1" ]; then
|
2017-07-12 12:06:12 +00:00
|
|
|
"$pipath" -part1 > /tmp/BOINCInstallLog.txt 2>&1
|
2010-12-06 10:24:59 +00:00
|
|
|
sleep 2
|
2017-07-12 12:06:12 +00:00
|
|
|
"$pipath" -part2 >> /tmp/BOINCInstallLog.txt 2>&1 &
|
2010-11-22 13:36:38 +00:00
|
|
|
else
|
2017-07-12 12:06:12 +00:00
|
|
|
"$pipath" -part1 2>&1 | tee /tmp/BOINCInstallLog.txt
|
2010-12-06 10:24:59 +00:00
|
|
|
sleep 2
|
2023-05-05 18:05:20 +00:00
|
|
|
# part2 continues to run after Installer finishes,
|
2014-03-12 08:20:55 +00:00
|
|
|
# and fails unless we redirect stdout to a file
|
2017-07-12 12:06:12 +00:00
|
|
|
"$pipath" -part2 >> /tmp/BOINCInstallLog.txt 2>&1 &
|
2010-11-22 13:36:38 +00:00
|
|
|
fi
|
2005-05-22 12:44:44 +00:00
|
|
|
|
|
|
|
exit 0
|