setup_native/scripts/osx_install_languagepack.applescript |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 09752e7560bc5a0b8f08e1d3ee4878db3208ca4b
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Fri Jul 21 08:51:02 2023 -0400
Commit:     خالد حسني <kha...@libreoffice.org>
CommitDate: Wed Jul 26 14:36:45 2023 +0200

    tdf#144053 Compare version to ProductKey entry in bootstraprc
    
    Using the mdls command fails if macOS Spotlight is disabled for the path
    selected by the user. So, instead, check if the path contains a matching
    "ProductKey=<version>" line in its Contents/Resources/bootstraprc file.
    
    Change-Id: Idbf8e2712b9fae8efa0997cf5c5c0f3fa6e68658
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154701
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <plub...@neooffice.org>
    Reviewed-by: خالد حسني <kha...@libreoffice.org>

diff --git a/setup_native/scripts/osx_install_languagepack.applescript 
b/setup_native/scripts/osx_install_languagepack.applescript
index 4083b01cd97c..270082396125 100644
--- a/setup_native/scripts/osx_install_languagepack.applescript
+++ b/setup_native/scripts/osx_install_languagepack.applescript
@@ -126,9 +126,9 @@ end if
 
 -- now only check whether the path is really from [PRODUCTNAME]
 try
-       do shell script "mdls --raw --name kMDItemFSName --name kMDItemVersion 
" & quoted form of (choice as string) & " | xargs -0 | fgrep '[PRODUCTNAME].app 
[PRODUCTVERSION]'"
+       do shell script "grep '^ProductKey=[PRODUCTNAME] [PRODUCTVERSION]$' " & 
quoted form of (choice as string) & "/Contents/Resources/bootstraprc"
 on error
-       display dialog (choice as string) & appInvalid buttons {InstallLabel} 
default button 1 with icon 0
+       display dialog (choice as string) & " " & appInvalid buttons {OKLabel} 
default button 1 with icon 0
        return 3 --wrong target-directory
 end try
 

Reply via email to