test.sh 724 B

1234567891011121314151617181920212223242526272829
  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/PolicyIcons/" "50 x 50"
  17. check_size "./Images/PolicyBranchIcons/" "50 x 50"
  18. if [ ! -e "game.png" ]; then
  19. echo "Missing game.png"
  20. fi
  21. if [ ! -e "game.atlas" ]; then
  22. echo "Missing game.atlas"
  23. fi