summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-06-16 11:02:39 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-06-16 12:47:06 +0200
commit7708b3f2d62f3defae261cd2d3621ae3b324d9d1 (patch)
tree9a5a3385520d2f4f628b9240814e46521b1d91c8 /setup_native
parent408f2a1c09a6563caf193384df8e1cac6e153fbb (diff)
tdf#133511 adjust langpack script for removal of CFBundleGetInfoString
3a028418190790c3bbaf6e505ff55b7bb8c0b474 removed the string from Info.plist, but the languagepack install script tried to use that to make sure whatever the user selects/is found is from the dame type (dev vs release and codeline/version). Instead of doing multiple greps/multiline ones (there are multiple version strings in that file, only one being from LO itself…) use mdls instead to pick the interesting properties to build a "PRODUCTNAME FULLVERSION" string again we can match against. --raw switch is nul separated, so add additional xargs -0 in there instead of trying to match a nul with grep (without --raw it is a nice human readable multiline string) Change-Id: I049a8425709a0c41b61aa09452490b481d39e4d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96439 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/scripts/osx_install_languagepack.applescript2
1 files changed, 1 insertions, 1 deletions
diff --git a/setup_native/scripts/osx_install_languagepack.applescript b/setup_native/scripts/osx_install_languagepack.applescript
index f5cd0dc6ac8f..495baceb4f31 100644
--- a/setup_native/scripts/osx_install_languagepack.applescript
+++ b/setup_native/scripts/osx_install_languagepack.applescript
@@ -126,7 +126,7 @@ end if
-- now only check whether the path is really from [PRODUCTNAME]
try
- do shell script "grep '<string>[PRODUCTNAME] [PRODUCTVERSION]' " & quoted form of (choice as string) & "/Contents/Info.plist"
+ do shell script "mdls --raw --name kMDItemDisplayName --name kMDItemVersion " & quoted form of (choice as string) & " | xargs -0 | fgrep '[PRODUCTNAME] [PRODUCTVERSION]'"
on error
display dialog (choice as string) & appInvalid buttons {InstallLabel} default button 1 with icon 0
return 3 --wrong target-directory