-
Notifications
You must be signed in to change notification settings - Fork 0
/
arc
executable file
·34 lines (27 loc) · 840 Bytes
/
arc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env racket
#lang racket/load
(require racket/cmdline)
(define run-repl #t)
(define files-to-load '())
(command-line
#:once-each
(("--no-repl")
"do not run the REPL"
(set! run-repl #f))
#:args files
(set! files-to-load files))
(define arcdir*
(path->string
(let-values (((base _2 _3)
(split-path (normalize-path
(find-system-path 'run-file)))))
base)))
(namespace-require `(file ,(string-append arcdir* "arc.ss")))
(let ((arc (new-arc arcdir*)))
((runtime-get arc 'ar-load) (string-append arcdir* "arc.arc"))
((runtime-get arc 'load) (string-append arcdir* "arc3.1/strings.arc"))
(for-each (runtime-get arc 'load) files-to-load)
(when run-repl
((runtime-get arc 'load) (string-append arcdir* "repl.arc"))
((runtime-get arc 'repl)))
(void))