Inert step refuses an unreadable plist; guard runs it on a fake bundle (R2.15)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-09 01:34:07 -04:00
1 parent b5d490c49a
commit f6f4b95108
2 files changed
+10 -1

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@
set -euo pipefail
app=${1:?usage: scripts/inert-lo.sh path/to/LibreOffice.app}
plist=$app/Contents/Info.plist
[ -f "$plist" ] || { echo "inert-lo.sh: no $plist" >&2; exit 1; }
plutil -lint -s "$plist" || { echo "inert-lo.sh: $plist is missing or unreadable" >&2; exit 1; }
lsregister=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
for key in CFBundleDocumentTypes CFBundleURLTypes UTExportedTypeDeclarations UTImportedTypeDeclarations; do
if /usr/libexec/PlistBuddy -c "Print :$key" "$plist" >/dev/null 2>&1; then