File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 3737 compressBinary = false
3838 enableLogging = false
3939 enableDebug = false
40+ retainBuildDir = false
4041)
4142
4243func main () {
@@ -134,6 +135,12 @@ func main() {
134135 Usage : "Run a Genesis script (Careful, don't infect yourself!)." ,
135136 Action : RunScript ,
136137 },
138+ {
139+ Name : "trace" ,
140+ Aliases : []string {"a" },
141+ Usage : "Show command line options" ,
142+ Action : TraceScript ,
143+ },
137144 }
138145
139146 sort .Sort (cli .FlagsByName (app .Flags ))
@@ -142,6 +149,15 @@ func main() {
142149 app .Run (os .Args )
143150}
144151
152+ func TraceScript (c * cli.Context ) error {
153+ files := c .Args ()
154+ for _ , f := range files {
155+ fmt .Printf ("Argument: %s\n " , f )
156+ fmt .Printf ("Base: %s\n " , filepath .Base (f ))
157+ }
158+ return nil
159+ }
160+
145161func TestScript (c * cli.Context ) error {
146162 logger := logrus .New ()
147163 logger .Formatter = & logging.GSEFormatter {}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "sync"
1212 "text/template"
1313
14+ "github.com/davecgh/go-spew/spew"
1415 "github.com/gen0cide/gscript/engine"
1516 "github.com/gen0cide/gscript/logging"
1617 "github.com/sirupsen/logrus"
@@ -153,6 +154,7 @@ func (c *Compiler) compileMacros() {
153154
154155func (c * Compiler ) writeScript () {
155156 for _ , vm := range c .VMs {
157+ c .Logger .Infof ("Script Information: %s" , spew .Sdump (vm ))
156158 if _ , err := os .Stat (vm .ScriptFile ); os .IsNotExist (err ) {
157159 c .Logger .Fatalf ("Genesis Script does not exist: %s" , vm .ScriptFile )
158160 }
Original file line number Diff line number Diff line change 1+ package compiler
2+
3+ type Options struct {
4+ Scripts []string
5+ Outfile string
6+ OS string
7+ Arch string
8+ ShowSource bool
9+ CompressionEnabled bool
10+ LoggingEnabled bool
11+ PreserveBuildDir bool
12+ }
You can’t perform that action at this time.
0 commit comments