test.sh 677 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/bash
  2. check_size () {
  3. for f in "$1"*; do
  4. info=$(file "$f")
  5. if [[ $info != *" PNG image data"* ]]; then
  6. echo "Not PNG recognized: $f"
  7. elif [[ $info != *$2* ]]; then
  8. echo "Image has wrong size: $f"
  9. fi
  10. done
  11. }
  12. echo "TODO: Update the game.png and game.atlas after each image change!"
  13. check_size "./Images/UnitIcons/" "200 x 200"
  14. check_size "./Images/BuildingIcons/" "200 x 200"
  15. check_size "./Images/UnitPromotionIcons/" "50 x 50"
  16. check_size "./Images/ResourceIcons/" "100 x 100"
  17. if [ ! -e "game.png" ]; then
  18. echo "Missing game.png"
  19. fi
  20. if [ ! -e "game.atlas" ]; then
  21. echo "Missing game.atlas"
  22. fi