Require normal image when hDPI version is provided (#60)

This commit is contained in:
Franck Nijhof 2020-03-19 14:07:44 +01:00 committed by GitHub
parent a451e8c232
commit ef731ee824
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,6 +42,15 @@ while read image; do
[[ "${type}" != "PNG" ]] \
&& error "${image}" "Invalid file type '${type}' for file"
# Ensure normal version exists when hDPI image is provided
[[ "${filename}" == "icon@2x.png" ]] \
&& [[ ! -f "${folderpath}/icon.png" ]] \
&& error "${image}" "hDPI icon was provided, but the normal version is missing"
[[ "${filename}" == "logo@2x.png" ]] \
&& [[ ! -f "${folderpath}/logo.png" ]] \
&& error "${image}" "hDPI logo was provided, but the normal version is missing"
# Validate image dimensions
if [[ "${filename}" == "icon.png" ]]; then
# icon dimension