2017-05-16 01:35:32 -05:00
|
|
|
#! /usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-08-14 20:54:16 -05:00
|
|
|
OS=$(uname | tr [:upper:] [:lower:])
|
|
|
|
HOST_ENV=${OS}-$(uname -m)
|
|
|
|
|
|
|
|
BIN=./dist/${HOST_ENV}-$(cat .current_build)/bin/
|
2020-06-13 04:24:49 -05:00
|
|
|
PATH=$BIN:${DEVKITPRO}/tools/bin/:${DEVKITARM}/bin/:$PATH
|
2019-07-21 23:54:30 -05:00
|
|
|
NOSTALGIA_BIN=build/gba-*/src/nostalgia/player/nostalgia.bin
|
|
|
|
NOSTALGIA_MEDIA=nostalgia_media.oxfs
|
2020-06-14 19:01:07 -05:00
|
|
|
NOSTALGIA_PROJECT=$1
|
2019-07-21 23:54:30 -05:00
|
|
|
NOSTALGIA_GBA=nostalgia.gba
|
2017-10-14 03:13:26 -05:00
|
|
|
MEDIA_HEADER=media_header.txt
|
2017-05-16 01:35:32 -05:00
|
|
|
|
2017-10-14 03:13:26 -05:00
|
|
|
echo NOSTALGIA_MEDIA_HEADER_________ > $MEDIA_HEADER
|
2017-05-16 01:35:32 -05:00
|
|
|
|
2019-07-21 23:54:30 -05:00
|
|
|
nost-pack -src $NOSTALGIA_PROJECT -dst $NOSTALGIA_MEDIA
|
2017-10-14 03:13:26 -05:00
|
|
|
|
2019-07-21 23:54:30 -05:00
|
|
|
padbin 32 $NOSTALGIA_BIN
|
|
|
|
ls -lh $NOSTALGIA_BIN
|
|
|
|
cat $NOSTALGIA_BIN $MEDIA_HEADER $NOSTALGIA_MEDIA > $NOSTALGIA_GBA
|
2020-01-09 18:30:35 -06:00
|
|
|
rm -f $MEDIA_HEADER #$NOSTALGIA_MEDIA
|
2019-07-21 23:54:30 -05:00
|
|
|
gbafix $NOSTALGIA_GBA
|