From b9b78f3b8acea1603b17ad633f798bbbb60a0933 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 14 Oct 2010 12:09:57 +0200 Subject: 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. --- tekuti/boot.scm | 20 +++++--------------- 1 file 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))) -- cgit v1.2.3-54-g00ecf