desktopToDarwinBundle: Fixup Exec

The "Exec" key in desktop items sometimes has one of the `%f`, `%F`,
`%u` and `%U` suffixes, which specify whether the command takes a file,
multiple files or a generalized URL or URLs. Darwin application bundles
do no understand this syntax so we do the next best thing, which is
simply dropping it.
This commit is contained in:
toonn 2022-03-10 13:36:30 +01:00
parent 96ba48cfbc
commit 99f387e462
No known key found for this signature in database
GPG Key ID: 44FF902A66DF4576

View File

@ -176,7 +176,7 @@ convertDesktopFile() {
local -r file=$1
local -r sharePath=$(dirname "$(dirname "$file")")
local -r name=$(getDesktopParam "${file}" "^Name")
local -r exec=$(getDesktopParam "${file}" "Exec")
local -r exec=$(getDesktopParam "${file}" "Exec" | sed -e 's/ %[fFuU]$//')
local -r iconName=$(getDesktopParam "${file}" "^Icon")
local -r squircle=$(getDesktopParam "${file}" "X-macOS-SquircleIcon")