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/+/154718 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Patrick Luby <plubius@neooffice.org>
This commit is contained in:
parent
0818c81e51
commit
1184a0130e
1 changed files with 2 additions and 2 deletions
|
@ -126,9 +126,9 @@ end if
|
||||||
|
|
||||||
-- now only check whether the path is really from [PRODUCTNAME]
|
-- now only check whether the path is really from [PRODUCTNAME]
|
||||||
try
|
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
|
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
|
return 3 --wrong target-directory
|
||||||
end try
|
end try
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue