aboutsummaryrefslogtreecommitdiff
path: root/module/main.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-07 23:53:32 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-07 23:53:32 +0200
commit3f5b5a031aedf46f8cfee6d09edb3beed9cf7672 (patch)
tree51dc73fd8b26288dbe808319de6ddc80c0d0c1d8 /module/main.scm
parentAdd location to blocks, rrules and last-modified to text in html. (diff)
downloadcalp-3f5b5a031aedf46f8cfee6d09edb3beed9cf7672.tar.gz
calp-3f5b5a031aedf46f8cfee6d09edb3beed9cf7672.tar.xz
Introduce --repl.
Diffstat (limited to 'module/main.scm')
-rwxr-xr-xmodule/main.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/module/main.scm b/module/main.scm
index 4b47025a..246e729c 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -28,23 +28,29 @@ exec guile -e main -s $0 "$@"
(ice-9 getopt-long)
(statprof)
+ (repl)
)
(define options
'((statprof (value optional))
+ (repl (value optional))
(help (single-char #\h))))
(define (ornull a b)
(if (null? a)
b a))
+
(define (wrapped-main args)
(define opts (getopt-long args options #:stop-at-first-non-option #t))
(define stprof (option-ref opts 'statprof #f))
+ (define repl (option-ref opts 'repl #f))
- (when stprof
- (statprof-start))
+ (when stprof (statprof-start))
+
+ (cond [(eqv? #t repl) (repl-start (format #f "~a/calp-~a" (runtime-dir) (getpid)))]
+ [repl => repl-start])
(let ((config-file (format #f "~a/.config/calp/config.scm"
(getenv "HOME"))))