nostalgia/scripts/gba-pkg

22 lines
577 B
Bash
Executable File

#! /usr/bin/env bash
set -e
BIN=./dist/$(cat .current_build)/bin/
PATH=$BIN:${DEVKITARM}/bin/:$PATH
NOSTALGIA_BIN=build/gba-*/src/nostalgia/player/nostalgia.bin
NOSTALGIA_MEDIA=nostalgia_media.oxfs
NOSTALGIA_PROJECT=sample_project
NOSTALGIA_GBA=nostalgia.gba
MEDIA_HEADER=media_header.txt
echo NOSTALGIA_MEDIA_HEADER_________ > $MEDIA_HEADER
nost-pack -src $NOSTALGIA_PROJECT -dst $NOSTALGIA_MEDIA
padbin 32 $NOSTALGIA_BIN
ls -lh $NOSTALGIA_BIN
cat $NOSTALGIA_BIN $MEDIA_HEADER $NOSTALGIA_MEDIA > $NOSTALGIA_GBA
rm -f $MEDIA_HEADER #$NOSTALGIA_MEDIA
gbafix $NOSTALGIA_GBA