Re: postinstall script packagemaker
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:subject:mime-version :content-type:from:x-priority:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=uunrEgqs53+/X01Keg8ciwp8jXsRiJO3GaOWNMqxGcg=; b=C4sW6Er8Zb/PfBed1eH/7Si7hj2D/zwBt9741o19ko+YQx83bHek9XiygaKXy9kLIV hZK6tqt4M9MUiNHiOqTJv0CqwJNOs5hkRjkc5FtpT4Zt9oKioBS++fk4WDiojzLkI2PR ujmChCELgyXwsZ1DUz955u9gDwrMoPRjeEKic= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:x-priority:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=PDSmzEclgSNT2kdexef0bZrzGAtUSjtT0RHNDrhaEAZAUQ8ATjv2jXHtMNedEq0rn5 OzV3vcNzJ2bH777IAUL9yGXltB3CN/wAl/Ogh4wDYgeHo2mydZV8MA7fc/pJilCC90qi dgZCAvmCf56hh2FP2Iq4Pces7gypGkuwFSUFU= On 19/10/2009, at 8:35 AM, Nick Peelman wrote: Are you trying to make the command work first outside of the script? -nick -- Nick Peelman peelman@gmail.com Sent via my BlackBerry -----Original Message----- From: Russell Gray <sweetpproductions@gmail.com> Date: Mon, 19 Oct 2009 08:36:18 To: <installer-dev@lists.apple.com> Subject: Re: postinstall script packagemaker Maybe a bug in PackageMaker...... I can't figure it out either, I tried renaming the key to something simple, but the script still deletes the entire plist. Russell On 19/10/2009, at 8:24 AM, Nick Peelman wrote: Yeah I'm not sure what the deal is. The delete subcommand should only delete the key you specify. The only reason it would delete the whole domain is if the key wasn't present. You may look closer at the actual key you're trying to delete for a character like & (just an example, there are several others) that would cause bash to not hand that arguement through. Or maybe it has spaces in it, double check spelling, etc. -nick -- Nick Peelman peelman@gmail.com Sent via my BlackBerry -----Original Message----- From: Russell Gray <sweetpproductions@gmail.com> Date: Mon, 19 Oct 2009 08:19:29 To: <installer-dev@lists.apple.com> Subject: Re: postinstall script packagemaker 10.6.1, and PackageMaker 3.0.4 On 19/10/2009, at 8:16 AM, Nick Peelman wrote: What version of OSX are you working on? -nick -- Nick Peelman peelman@gmail.com Sent via my BlackBerry -----Original Message----- From: Russell Gray <sweetpproductions@gmail.com> Date: Mon, 19 Oct 2009 08:17:18 To: <installer-dev@lists.apple.com> Subject: Re: postinstall script packagemaker that deletes the enitire plist file..... im stuck On 19/10/2009, at 8:00 AM, Nick Peelman wrote: defaults delete ~/Library/Preferences/com.apple.Safari deleteKey -nick On Sun, Oct 18, 2009 at 4:54 PM, Russell Gray <sweetpproductions@gmail.com> wrote: how do I delete a key in a plist file, in a postinstall script? I have tried: Code: #!/bin/sh defaults delete $HOME/Library/Preferences/com.apple.Safari myKeyToDelete the script deletes the entire plist file though, not the key? I tried this: Code: #!/bin/sh /usr/bin/defaults delete myKeyToDelete which generates an error in the installer, and doesn't delete the key. and this one: Code: #!/bin/sh MY_UNUSED_KEY="com.apple.Safari myKeyToDelete" if [ -d "MY_UNUSED_KEY" ]; then echo "Removing unused preferences" /usr/bin/defaults delete "MY_UNUSED_KEY" fi which doesnt generate an error, but also doesnt delete the key? this shouldnt be that difficult.... _______________________________________________ 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/nick %40peelman.us This email sent to nick@peelman.us -- Nick Peelman peelman@gmail.com _______________________________________________ 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/nick %40peelman.us _______________________________________________ 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/nick%40peelman.us _______________________________________________ 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... the script works perfectly, when run directly through Terminal - just not as a postinstall script in PackageMaker? works as expected for me...you sure there isn't something else wrong there? I've used similar deletes elsewhere, syntactically identical to that, without issue. This email sent to nick@peelman.us _______________________________________________ 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/nick %40peelman.us This email sent to nick@peelman.us This email sent to nick@peelman.us This email sent to site_archiver@lists.apple.com
participants (1)
-
Russell Gray