From 7708b3f2d62f3defae261cd2d3621ae3b324d9d1 Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Tue, 16 Jun 2020 11:02:39 +0200 Subject: tdf#133511 adjust langpack script for removal of CFBundleGetInfoString MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- setup_native/scripts/osx_install_languagepack.applescript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 '[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 -- cgit