| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
PackageName.pre_install:----------------------------------------------------------------
#!/bin/tcsh
set hostname = `"$PACKAGE_PATH/Contents/Resources/getserver"`
echo $hostname > /tmp/ServerHost.dat
PackageName.pre_upgrade:
#!/bin/tcsh
set oldhost = `cat /old/config/file`
set hostname = `"$PACKAGE_PATH/Contents/Resources/getserver" $oldhost`
echo $hostname > /tmp/ServerHost.dat
getserver:
#!/bin/tcsh
/usr/bin/osascript <<END
beep
tell application "Installer"
activate
set reply to (display dialog "Enter the hostname of your server.\r\rPress
None if you will not be using network rendering." default answer "$1"
buttons {"OK", "None"} default button "OK")
set res to (button returned of reply) as string
set hostn to (text returned of reply) as string
if res = "None" then set hostn to ""
end tell
return hostn
END
PackageName.post_install and .post_upgrade:
#!/bin/tcsh
set hostname = `cat /tmp/ServerHost.dat`
rm /tmp/ServerHost.dat
if ( $hostname != "" ) then
# Do something usefuls with $hostname
endif
Hope this helps
Phil
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
| References: | |
| >RE: Package maker (From: "Phil Barrett" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.