Browse code
clean: deduplicate entry points
Edward Langley authored on 10/10/2019 07:23:50
Showing 1 changed files
Showing 1 changed files
... | ... |
@@ -139,13 +139,6 @@ |
139 | 139 |
|
140 | 140 |
(:menu-bar edit-menu window-menu)) |
141 | 141 |
|
142 |
-(defun start-in-repl (&optional (accounts (asdf:system-relative-pathname :aws-access "accounts.json"))) |
|
143 |
- (ubiquitous:restore :cj.mfa-tool) |
|
144 |
- (setf aws:*session* (aws:make-session) |
|
145 |
- *print-readably* nil |
|
146 |
- *accounts* (reprocess-accounts (load-accounts accounts))) |
|
147 |
- (interface :default-account |
|
148 |
- (ubiquitous:value :default-account))) |
|
149 | 142 |
|
150 | 143 |
|
151 | 144 |
(defun show-splash (&optional (image (bundle-resource "splash.png"))) |
... | ... |
@@ -185,14 +178,19 @@ |
185 | 178 |
(capi:apply-in-pane-process interface |
186 | 179 |
'capi:destroy interface)))))) |
187 | 180 |
|
181 |
+(defun run (&optional accounts) |
|
182 |
+ (setf *print-readably* nil |
|
183 |
+ *accounts* (reprocess-accounts (load-accounts accounts)) |
|
184 |
+ aws:*session* (fwoar.credential-provider:make-aws-session)) |
|
185 |
+ (ubiquitous:restore :cj.mfa-tool) |
|
186 |
+ (interface :default-account |
|
187 |
+ (ubiquitous:value :default-account))) |
|
188 |
+ |
|
189 |
+(defun start-in-repl (&optional (accounts (asdf:system-relative-pathname :aws-access "accounts.json"))) |
|
190 |
+ (run accounts)) |
|
191 |
+ |
|
188 | 192 |
(defun main () |
193 |
+ (setf *debugger-hook* 'debugging) |
|
189 | 194 |
(capi:set-application-interface (make-instance 'my-app-interface)) |
190 | 195 |
(show-splash) |
191 |
- (setf *debugger-hook* 'debugging |
|
192 |
- *print-readably* nil |
|
193 |
- *accounts* (reprocess-accounts (load-accounts))) |
|
194 |
- (ubiquitous:restore :cj.mfa-tool) |
|
195 |
- (let ((*debugger-hook* 'debugging)) |
|
196 |
- (setf aws:*session* (aws:make-session)) |
|
197 |
- (interface :default-account |
|
198 |
- (ubiquitous:value :default-account)))) |
|
196 |
+ (run)) |