[Libreoffice-commits] core.git: setup_native/scripts

Christian Lohmaier (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 16 10:47:40 UTC 2020


 setup_native/scripts/osx_install_languagepack.applescript |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7708b3f2d62f3defae261cd2d3621ae3b324d9d1
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Tue Jun 16 11:02:39 2020 +0200
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Tue Jun 16 12:47:06 2020 +0200

    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 at googlemail.com>

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


More information about the Libreoffice-commits mailing list