-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake.sh
executable file
·35 lines (30 loc) · 905 Bytes
/
make.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
if [[ -v MSYSTEM ]]; then
BASE="c:/Users/$USER/Documents/gens/ROMS"
else
BASE="$HOME/.wine/drive_c/games/gens/ROMS"
fi
ROMDIR="$BASE/GenRen/"
HACKDIR="$BASE/"
CDDIR="$BASE/"
export ROMDIR HACKDIR CDDIR
function check_run()
{
if [[ (! -f "sonic/common/$2") || ("sonic/common/$2" -ot "$1") ]]; then
echo "$3"
./$1
fi
}
find . -iname '*~' -delete
check_run find_huds.lua hud-codes.lua "Finding HUD code points..."
check_run find_bosses.lua boss-tables.lua "Finding boss code points..."
echo "Generating luaimg files..."
./imagedump.sh
BUILD="builds/sonic-hud-$(date +"%F").7z"
mkdir -p builds
rm -f "$BUILD"
echo "Creating archive '$BUILD'..."
unix2dos *.txt *.md
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "$BUILD" *.txt *.md sonic-hud.lua headers/*.lua img/*.luaimg sonic/*.lua sonic/common/*.lua sonic/common/game-data/*.lua &> /dev/null
dos2unix *.txt *.md
echo "All done."