Skip to content

Commit

Permalink
Ports: Simplify the output from identify when installing icons
Browse files Browse the repository at this point in the history
This ensures that the correct index is always used when selecting an
image of a particular size.
  • Loading branch information
tcl3 authored and timschumi committed Aug 23, 2023
1 parent d09271b commit 5af7d5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Ports/.port_include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ install_icon() {
fi

for icon_size in "16x16" "32x32"; do
index=$(run identify "$icon" | grep "$icon_size" | grep -oE "\[[0-9]+\]" | tr -d "[]" | head -n1)
index=$(run identify -format '%p;%wx%h\n' "$icon" | grep "$icon_size" | cut -d";" -f1 | head -n1)
if [ -n "$index" ]; then
run convert "${icon}[${index}]" "app-${icon_size}.png"
else
Expand Down

0 comments on commit 5af7d5d

Please sign in to comment.