#!/usr/bin/env bash # Gera o trip-on-the-funny-boat.pgapp do Trip on the Funny Boat 1.5 (Olli Etuaho, Joona Karjalainen e Pekka Kujansuu, PyWeek 2, # 2006: codigo GPL-2, graficos, sons e musica MIT; fonte Vera, Bitstream) a partir do commit 3308a6a do repositorio # github.com/AMDmi3/funnyboat (versao 1.5 convertida para Python 3, com o LICENSE-MEDIA.txt MIT; o zip antigo do PyWeek # trazia a musica em CC BY-NC-ND e nao serve), com o patch trip-on-the-funny-boat/web.patch: lacos assincronos (pygbag), # sem placar online nem endereco do site, saves em /saves, "Quit" voltando ao menu. Zip deterministico (Builds/pgapp.py). # # src/FredGames.Bundler/Builds/build-trip-on-the-funny-boat.sh # # Saida: artifacts/build/trip-on-the-funny-boat-3308a6a/trip-on-the-funny-boat.pgapp set -euo pipefail COMMIT=3308a6a9dbd6959d147c4221cd3ca8087427f7cf SHA256=b76bd8e360200344cfa4757d566ab4d456a7c3d6f5a0a83df70b5f8996d7399a here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" root="$(git -C "$here" rev-parse --show-toplevel 2>/dev/null || pwd)" out="$root/artifacts/build/trip-on-the-funny-boat-3308a6a" cache="$root/artifacts/build/cache" mkdir -p "$cache" tgz="$cache/funnyboat-3308a6a.tar.gz" [ -f "$tgz" ] || curl -fsSL "https://github.com/AMDmi3/funnyboat/archive/$COMMIT.tar.gz" -o "$tgz" echo "$SHA256 $tgz" | shasum -a 256 -c - rm -rf "$out" mkdir -p "$out/tree" tar -xzf "$tgz" -C "$out/tree" --strip-components 1 cd "$out/tree" rm -f funnyboat.bat funnyboat.sh patch -p1 < "$here/trip-on-the-funny-boat/web.patch" find . -name __pycache__ -prune -exec rm -rf {} \; python3 -I "$here/pgapp.py" "$out/tree" "$out/trip-on-the-funny-boat.pgapp" shasum -a 256 "$out/trip-on-the-funny-boat.pgapp"