Skip to content

Commit

Permalink
If logo missing, copy dark icon as well as light one (#5116)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-r authored Jan 28, 2024
1 parent 0b7d360 commit d87ea6b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d87ea6b

Please sign in to comment.