Re: Install requirement script returning true
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references :mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; bh=9srFImqNRKAQ+0Sm0556wo/lHT6Z5UjgUbQCm60j0WA=; b=Mofbb/3Go5jpwlfDzNZhRClEZx7GPzk//RdWO90YBf9jUyyOPQ4OgGE4NAm0H9NAkZ A4v4RTyf2exZ2+gOQqPdXBccyGGWo66Mr8R0vHrYsSi0hgTLWvQq+PwqgWWqxOtVC93i LWuya9TGIn3bsC/SswSsEZPsVQxQ+Aw4pxM6w= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to:x-mailer; b=u1x4QG7VaSkI663acngo4zbv64QA6+QDjzW00sYIx4o3GkQhrC4LIVozm1hEAxzZoE uTXozyfV7pON9kBvpf7djyl4eMw8WXt7gyXeDAGsXavUYiCwLcMbM4Gn2nrVaLWY7CLC 0+O6VgI2e3Xagj2SbXDzZWVteXMSroHm2kn/Y= On Oct 7, 2008, at 11:46 AM, Andy Bell wrote: Hi, The script is simple, and simply detects a running application: #!/bin/sh if ps auxc | grep -v grep | grep <proc name>; then exit 1 else exit 0 fi I have in raw editing mode: _______________________________________________ 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... I am quite new to PackageMaker(3.0.2) and have run into a problem with a shell script always returning true. <installation-check script="pm_install_check();"/> <script>function pm_install_check() { if(!(system.run('/Users/andy/devel/qt/putplace/running.sh') == true)) { my.result.title = 'Update'; my.result.message = 'You will need to close PutPlace before updating'; my.result.type = 'Fatal'; return false; } return true; } </script> The question how can get my shell script to return 'false' when the application is not running? 1. Please note that the JavaScript code is incorrect: your script is referenced with an absolute path that won't work within the package. This is a bug which has been reported to Apple. 2. Check that the allow-external-scripts option is set to 'yes' (or 'true'). 3. There's a new version of PackageMaker with the latest Dev Tools (3.0.3). This email sent to site_archiver@lists.apple.com
participants (1)
-
Iceberg-Dev