desktopToDarwinBundle: Implement %c Exec field code

This commit is contained in:
toonn 2022-03-31 13:00:11 +02:00
parent 4a749a89c4
commit 4dc94e1489
No known key found for this signature in database
GPG key ID: 44FF902A66DF4576

View file

@ -175,7 +175,8 @@ processExecFieldCodes() {
local -r file=$1
local -r execRaw=$(getDesktopParam "${file}" "Exec")
local -r execNoK="${execRaw/\%k/${file}}"
local -r exec="${execNoK// %[fFuUic]}"
local -r execNoKC="${execNoK/\%c/$(getDesktopParam "${file}" "Name")}"
local -r exec="${execNoKC// %[fFuUi]}"
if [[ "$exec" != "$execRaw" ]]; then
echo 1>&2 "desktopToDarwinBundle: Application bundles do not understand desktop entry field codes. Changed '$execRaw' to '$exec'."
fi