Lunatic: prettify listglobals.sh output.

git-svn-id: https://svn.eduke32.com/eduke32@3856 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-06-07 10:18:16 +00:00
parent ddb0d3f63d
commit a0f00e28c3

View file

@ -9,7 +9,9 @@ fi
# Lua 5.2 required to parse ::label:: / goto generated by LunaCON. # Lua 5.2 required to parse ::label:: / goto generated by LunaCON.
LUAC=luac LUAC=luac
# Strip LuaJIT specific syntax # Strip LuaJIT specific syntax first. Run luac and extract interesting lines.
sed -r -e "s/[0-9]+U?LL/0/g" "$1" | $LUAC -p -l - | grep "$2ETTABUP.*; _ENV " | sed -r -e "s/[0-9]+U?LL/0/g" "$1" | $LUAC -p -l - | grep "$2ETTABUP.*; _ENV " |
# mark where the new module environment starts # Reformat them.
sed -e "s/; module/; module ____________________/" sed -e 's/.*\[\(.*\)\].*\([SG]ET\)TABUP.*"\(.*\)".*/\1: \2 \3/' |
# Mark where the new module environment starts.
sed -e 's/GET module/& ____________________/'