-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If logo missing, copy dark icon as well as light one (#5116)
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,10 @@ find ./build -type f -name "icon.png" | while read icon; do | |
cp "${icon}" "${dir}/logo.png" | ||
echo "Using ${icon} as logo" | ||
fi | ||
if [[ ! -f "${dir}/dark_logo.png" ]] && [[ -f "${dir}/dark_icon.png" ]]; then | ||
cp "${dir}/dark_icon.png" "${dir}/dark_logo.png" | ||
echo "Using ${dir}/dark_icon.png as dark_logo" | ||
fi | ||
done | ||
|
||
# Use icon as icon@2x in case it is missing | ||
|
@@ -75,6 +79,10 @@ find ./build -type f -name "icon.png" | while read icon; do | |
cp "${icon}" "${dir}/[email protected]" | ||
echo "Using ${icon} as hDPI icon" | ||
fi | ||
if [[ ! -f "${dir}/[email protected]" ]] && [[ -f "${dir}/[email protected]" ]]; then | ||
cp "${dir}/[email protected]" "${dir}/[email protected]" | ||
echo "Using ${dir}/[email protected] as dark_logo@2x" | ||
fi | ||
done | ||
|
||
# Use logo as logo@2x in case it is missing | ||
|
@@ -100,6 +108,10 @@ find ./build/brands -type f -name "icon.png" | while read icon; do | |
cp "${icon}" "${dir}/logo.png" | ||
echo "Using ${icon} as logo" | ||
fi | ||
if [[ ! -f "${dir}/dark_logo.png" ]] && [[ -f "${dir}/dark_icon.png" ]]; then | ||
cp "${dir}/dark_icon.png" "${dir}/dark_logo.png" | ||
echo "Using ${dir}/dark_icon.png as dark_logo" | ||
fi | ||
done | ||
|
||
# Use brand icon as icon@2x in case it is missing | ||
|
@@ -109,6 +121,10 @@ find ./build/brands -type f -name "icon.png" | while read icon; do | |
cp "${icon}" "${dir}/[email protected]" | ||
echo "Using ${icon} as hDPI icon" | ||
fi | ||
if [[ ! -f "${dir}/[email protected]" ]] && [[ -f "${dir}/[email protected]" ]]; then | ||
cp "${dir}/[email protected]" "${dir}/[email protected]" | ||
echo "Using ${dir}/[email protected] as dark_logo@2x" | ||
fi | ||
done | ||
|
||
# Use brand logo as logo@2x in case it is missing | ||
|