minify.sh 600 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. NC='\033[0m'
  3. YELLOW='\033[0;33m'
  4. # Build desktop icon
  5. echo "Creating desktop icon PNG..."
  6. if command -v "inkscape" &> /dev/null; then
  7. inkscape -z -w 256 -h 256 icons/application/scalable/apps/keepassxc.svg -e icons/application/256x256/apps/keepassxc.png
  8. else
  9. echo -e "${YELLOW}Could not find inkscape; keepassxc.png not built!${NC}"
  10. fi
  11. # Minify SVG's
  12. echo "Minifying SVG's..."
  13. minify -o icons/badges --match=.svg icons/badges
  14. minify -o icons/database --match=.svg icons/database
  15. # Crush PNG's
  16. echo "Crushing PNG's..."
  17. find . -iname '*.png' -exec pngcrush -ow -brute {} \;