【发布时间】:2014-11-29 20:41:35
【问题描述】:
我使用 pkgbuild 创建了一个默认的组件属性列表文件。该文件如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList- 1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>BundleHasStrictIdentifier</key>
<true/>
<key>BundleIsRelocatable</key>
<true/>
<key>BundleIsVersionChecked</key>
<true/>
<key>BundleOverwriteAction</key>
<string>upgrade</string>
<key>RootRelativeBundlePath</key>
<string>MyApp.app</string>
</dict>
</array>
</plist>
我想使用 shell 脚本修改这个文件。我尝试使用 defaults write 但它没有做任何事情。
有什么办法呢?(例如:我要设置BundleIsRelocatable为false)
【问题讨论】:
标签: macos shell scripting plist pkgbuild