summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Andy Wingo2010-10-14 12:09:57 +0200
committerGravatar Andy Wingo2010-11-13 18:47:03 +0100
commitb9b78f3b8acea1603b17ad633f798bbbb60a0933 (patch)
tree6c96efd06185dd26f63e36705a861351e745fba8
parentd3cf39b5c06f3196db75ae19545c409e90556238 (diff)
downloadtekuti-b9b78f3b8acea1603b17ad633f798bbbb60a0933.tar.gz
tekuti-b9b78f3b8acea1603b17ad633f798bbbb60a0933.zip
updates to (tekuti boot)
* tekuti/boot.scm (*option-grammar*): Remove repl and gds args, replaced by `listen'. (parse-options): `listen' causes tekuti to spawn a repl server. (boot): No more repl option; we always sit down into the event-loop.
-rw-r--r--tekuti/boot.scm20
1 files changed, 5 insertions, 15 deletions
diff --git a/tekuti/boot.scm b/tekuti/boot.scm
index 627cfdf..dd85bf4 100644
--- a/tekuti/boot.scm
+++ b/tekuti/boot.scm
@@ -29,15 +29,12 @@
(define-module (tekuti boot)
#:use-module (ice-9 format)
#:use-module (ice-9 getopt-long)
- #:use-module (ice-9 threads)
- #:use-module (tekuti util)
#:use-module (tekuti git)
#:use-module (tekuti mod-lisp)
#:export (boot))
-(define *option-grammar* '((gds)
+(define *option-grammar* '((listen)
(usage)
- (repl)
(config (value #t) (single-char #\c))
(version (single-char #\v))
(help (single-char #\h))))
@@ -53,7 +50,7 @@
(map repr-option *option-grammar*)))
(define (version)
- (format #t "tekuti version 0.1" (car (program-arguments))))
+ (format #t "tekuti version 0.1"))
;; krap code
(define (parse-options args)
@@ -68,11 +65,8 @@
(begin
(version)
(exit 0)))
- (if (option-ref opts 'gds #f)
- (let ((run-utility (@ (ice-9 gds-client) run-utility)))
- (make-thread
- (lambda ()
- (with-backtrace (run-utility))))))
+ (if (option-ref opts 'listen #f)
+ ((@ (system repl server) spawn-server)))
opts))
(define (boot args)
@@ -85,8 +79,4 @@
(set-current-module config-module)
(primitive-load config))))))
(ensure-git-repo)
- (if (option-ref options 'repl #f)
- (begin (make-thread event-loop)
- (scm-style-repl))
- (event-loop))))
-
+ (event-loop)))