diff --git a/scripts/build.sh b/scripts/build.sh index 03625b96196..ab7d7897ea7 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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}/icon@2x.png" echo "Using ${icon} as hDPI icon" fi + if [[ ! -f "${dir}/dark_logo@2x.png" ]] && [[ -f "${dir}/dark_icon@2x.png" ]]; then + cp "${dir}/dark_icon@2x.png" "${dir}/dark_logo@2x.png" + echo "Using ${dir}/dark_icon@2x.png 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}/icon@2x.png" echo "Using ${icon} as hDPI icon" fi + if [[ ! -f "${dir}/dark_logo@2x.png" ]] && [[ -f "${dir}/dark_icon@2x.png" ]]; then + cp "${dir}/dark_icon@2x.png" "${dir}/dark_logo@2x.png" + echo "Using ${dir}/dark_icon@2x.png as dark_logo@2x" + fi done # Use brand logo as logo@2x in case it is missing