test.sh 622 B

1234567891011121314151617181920212223242526
  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/NationIcons/" "100 x 100"
  16. if [ ! -e "game.png" ]; then
  17. echo "Missing game.png"
  18. fi
  19. if [ ! -e "game.atlas" ]; then
  20. echo "Missing game.atlas"
  21. fi