83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
+
|
"-cols"
"-run"
"-test"
"-xterm"
"-debug"
"-host"
"-transport"
"-start-dir"
)
(list "-h"
"-use-server"
"-guimonitor"
"-main"
"-v"
"-q"
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
+
+
+
+
+
+
+
+
+
|
(print "Unrecognised arguments: " (string-intersperse remargs " "))
(exit)))
(if (args:get-arg "-h")
(begin
(print help)
(exit)))
(if (args:get-arg "-start-dir")
(if (directory-exists? (args:get-arg "-start-dir"))
(let ((fullpath (common:real-path (args:get-arg "-start-dir"))))
(setenv "PWD" fullpath)
(change-directory fullpath))
(begin
(debug:print-error 0 *default-log-port* "non-existant start dir " (args:get-arg "-start-dir") " specified, exiting.")
(exit 1))))
;; TODO: Move this inside (main)
;;
(if (not (launch:setup))
(begin
(print "Failed to find megatest.config, exiting")
(exit 1)))
|