diff options
author | toonn <toonn@toonn.io> | 2022-03-31 13:44:15 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2022-03-31 13:44:15 +0200 |
commit | 196f989ae88a13210720cb08d53a57c5c05481a0 (patch) | |
tree | f0b37a2e6983d01259ee85dcf3198d50d5eb6771 /pkgs/build-support/setup-hooks | |
parent | 4dc94e1489fd7045e4b898996cecfbf28ed87ab3 (diff) |
desktopToDarwinBundle: Implement %i Exec field code
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r-- | pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh b/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh index 5b8a4d0e90fb0..92c790e9907fe 100644 --- a/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh +++ b/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh @@ -176,7 +176,9 @@ processExecFieldCodes() { local -r execRaw=$(getDesktopParam "${file}" "Exec") local -r execNoK="${execRaw/\%k/${file}}" local -r execNoKC="${execNoK/\%c/$(getDesktopParam "${file}" "Name")}" - local -r exec="${execNoKC// %[fFuUi]}" + local -r icon=$(getDesktopParam "${file}" "Icon") + local -r execNoKCI="${execNoKC/\%i/${icon:+--icon }${icon}}" + local -r exec="${execNoKCI// %[fFuU]}" if [[ "$exec" != "$execRaw" ]]; then echo 1>&2 "desktopToDarwinBundle: Application bundles do not understand desktop entry field codes. Changed '$execRaw' to '$exec'." fi |