From a0f00e28c3eae545360b6000702e83fdc40c0eff Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 7 Jun 2013 10:18:16 +0000 Subject: [PATCH] Lunatic: prettify listglobals.sh output. git-svn-id: https://svn.eduke32.com/eduke32@3856 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/lunatic/listglobals.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/lunatic/listglobals.sh b/polymer/eduke32/source/lunatic/listglobals.sh index e6347334f..53e862420 100755 --- a/polymer/eduke32/source/lunatic/listglobals.sh +++ b/polymer/eduke32/source/lunatic/listglobals.sh @@ -9,7 +9,9 @@ fi # Lua 5.2 required to parse ::label:: / goto generated by LunaCON. 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 " | - # mark where the new module environment starts - sed -e "s/; module/; module ____________________/" + # Reformat them. + sed -e 's/.*\[\(.*\)\].*\([SG]ET\)TABUP.*"\(.*\)".*/\1: \2 \3/' | + # Mark where the new module environment starts. + sed -e 's/GET module/& ____________________/'