Skip to content

Commit

Permalink
Check optipng is available before compressing
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarthayhurst committed Jul 24, 2021
1 parent b02a9a1 commit 73fd08e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ generateIcons() {
output "warning" "Please install inkscape or imagemagick (preferably inkscape)"
return
fi
optipng -strip all -nc "$buildDir/$pngFile"
if checkCommand optipng; then
#Use -nc to avoid indexing, keeping GRUB support
optipng -strip all -nc "$buildDir/$pngFile"
else
output "warning" "Optipng not available, icons won't be compressed"
fi
}
assetSize="${1/px}"
if [[ "$3" == "default" ]] && [[ "$2" == "select" ]]; then
Expand Down

0 comments on commit 73fd08e

Please sign in to comment.