Carp/lisp/boot.carp

23 lines
635 B
Plaintext
Raw Normal View History

2016-01-13 16:09:27 +03:00
(def carp-dir (getenv "CARP_DIR"))
(def carp-dev (not (= "" (getenv "CARP_DEV"))))
2016-01-13 16:09:27 +03:00
(load-lisp (str carp-dir "lisp/core.carp"))
(when carp-dev
(load-lisp (str carp-dir "lisp/core_tests.carp")))
(load-lisp (str carp-dir "lisp/compiler.carp"))
2016-01-13 16:09:27 +03:00
(when carp-dev
(do
(load-lisp (str carp-dir "lisp/compiler_tests.carp"))
(load-lisp (str carp-dir "lisp/examples.carp"))
(load-lisp (str carp-dir "lisp/glfw_test.carp"))))
(let [user-boot-file (str (getenv "HOME") "/.carp/user.carp")]
(when (file-exists? user-boot-file)
(load-lisp user-boot-file)))
(when (file-exists? "project.carp")
(load-lisp "project.carp"))