how to get a return value from a shell script?
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Thread-index: Acbsn/SNmTqCCtgHRJKPmg/Ly2jGqwAB1e6D Thread-topic: how to get a return value from a shell script? Hi there, I am wrinting an installer using packageMaker. In my installer, I have an InstallationCheck perl script to call a shell script that returns an exit status. The shell script file is put under the same directory of InstallationCheck file and set to the execute mode. In the InstallationCheck script, I have: my $rv = 0; $rv = system('checkMyInstall'); After running this script, the return value always was -1; If changing the statement to: $rv = system('sh checkMyInstall'); the installer complainted it couldn't find the checkMyInstall file. However, if I ran the InstallationCheck from a terminal window, it was fine. Can someone tell me how I can get the return value from the shell script? Thanks. _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ben Zhu