raze/polymer/eduke32/source/lunatic/listglobals.sh
helixhorned 541fca6dac Lunatic: gasping for some air.
That is, fix some oversights introduced in the preceding runs.
listglobals.sh is a helper to find global accesses.
Translator: add "number-conversion" warning option, max. error limit.

git-svn-id: https://svn.eduke32.com/eduke32@3256 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:28 +00:00

12 lines
369 B
Bash
Executable file

#!/bin/sh
if [ -z "$1" ]; then
# S or G can be used to display SETGLOBALs or GETGLOBALs, respectively
echo "Usage: $0 <file.lua> [S|G]"
exit 1;
fi
# Strip LuaJIT specific syntax
sed -r -e "s/[0-9]+U?LL/0/g" "$1" | luac -p -l - | grep "$2ETGLOBAL" |
# mark where the new module environment starts
sed -e "s/; module/; module ____________________/"