简体   繁体   中英

packagemaker run shell script

I'm using PackageMaker to install an app update and want to add a preinstall script to delete some files in the /Applications/ folder. The script is simply:

#!/bin/bash
rm /Applications/...

etc.

If I run this script with Terminal using

bash preinstall.sh

it works fine.

However, when I add it to PackageMaker and run the .mpkg file the script opens in Text Edit but does not run. How do I get it to run but not open?

I think you are adding scripts in a wrong way. You can go through this link which has detailed explanation about scripting in Packagemaker and a sample script as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM