racket/collects/tool/main.ss
2010-04-21 14:24:07 -06:00

23 lines
828 B
Scheme

;; Because `racket-tool setup' is used to rebuild .zos, check for "setup"
;; directly.
;; Note that this file is listed in "info.ss" so that it never gets a
;; .zo file. Do not `require' this module from anywhere, not even
;; `for-label', otherwise it could get a .zo anyway.
(module main '#%kernel
(#%require '#%min-stx
;; Need to make sure they're here:
'#%builtin)
(let-values ([(cmdline) (current-command-line-arguments)])
(if (and (positive? (vector-length cmdline))
(equal? "setup" (vector-ref cmdline 0)))
(parameterize ([current-command-line-arguments
(list->vector
(cdr
(vector->list cmdline)))])
(dynamic-require 'setup/main #f))
(dynamic-require 'tool/tool #f))))