mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-03 20:38:13 +03:00
Tool for comparing ain files. This is used by the script rtt.sh to ensure that disassembling and then reassembling an ain file produces an equivalent result.
15 lines
298 B
Bash
Executable File
15 lines
298 B
Bash
Executable File
#!/bin/bash
|
|
|
|
SRC_AIN="$1"
|
|
SRC_JAM=$(tempfile)
|
|
DST_AIN=$(tempfile)
|
|
|
|
echo "Dumping code from $SRC_AIN"
|
|
aindump -c -o "$SRC_JAM" "$SRC_AIN"
|
|
echo "Assembling dumped code"
|
|
ainedit -c "$SRC_JAM" -o "$DST_AIN" "$SRC_AIN"
|
|
echo "Comparing AIN files"
|
|
aincmp "$SRC_AIN" "$DST_AIN"
|
|
rm "$SRC_JAM"
|
|
rm "$DST_AIN"
|