mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-05 12:30:42 +00:00
948b4f82fc
This is mostly for debugging, since currently, Mapster32 restores sprites not in the same order as the original sprite index order. Also, expose this option from map2text.lua and mapdiff.sh. git-svn-id: https://svn.eduke32.com/eduke32@2968 1a8010ca-5511-0410-912e-c29ae57300e0
34 lines
618 B
Bash
Executable file
34 lines
618 B
Bash
Executable file
#!/bin/sh
|
|
|
|
DIFF="git diff -U2 --no-index --color-words"
|
|
CMD="/usr/bin/env luajit ./map2text.lua"
|
|
|
|
opt=""
|
|
|
|
if [ `uname -s` != "Linux" ]; then
|
|
# I think 'tempfile' isn't in POSIX. Feel free to use 'mktemp' or something
|
|
# but absolutely test it before.
|
|
echo "This helper script is for Linux only."
|
|
return 1
|
|
fi
|
|
|
|
if [ "$1" = "-c" -o "$1" = "-C" ]; then
|
|
opt="$1"
|
|
shift
|
|
fi
|
|
|
|
if [ -z "$1" -o -z "$2" ]; then
|
|
echo "Usage: ./mapdiff.sh [-c] <file.map> <file2.map>"
|
|
exit 1
|
|
fi
|
|
|
|
tf1=`tempfile`
|
|
tf2=`tempfile`
|
|
|
|
$CMD $opt "$1" > "$tf1"
|
|
$CMD $opt "$2" > "$tf2"
|
|
|
|
$DIFF "$tf1" "$tf2"
|
|
|
|
rm "$tf1"
|
|
rm "$tf2"
|