mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
Ports: Simplify the output from identify
when installing icons
This ensures that the correct index is always used when selecting an image of a particular size.
This commit is contained in:
parent
d09271be35
commit
5af7d5da2f
Notes:
sideshowbarker
2024-07-17 02:28:18 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/5af7d5da2f Pull-request: https://github.com/SerenityOS/serenity/pull/20654 Reviewed-by: https://github.com/timschumi ✅
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user