2016-01-13 16:09:27 +03:00
|
|
|
(def carp-dir (getenv "CARP_DIR"))
|
2016-01-18 15:43:59 +03:00
|
|
|
(def carp-dev (not (= "" (getenv "CARP_DEV"))))
|
2016-01-13 16:09:27 +03:00
|
|
|
|
2016-02-22 18:20:59 +03:00
|
|
|
(if (= carp-dir "")
|
|
|
|
(do (println "Environment variable 'CARP_DIR' is not set, did you run 'carp-repl' directly? Please use the carp shell script instead.")
|
|
|
|
(exit -1))
|
|
|
|
nil)
|
|
|
|
|
2016-01-15 12:17:26 +03:00
|
|
|
(load-lisp (str carp-dir "lisp/core.carp"))
|
2016-01-18 15:43:59 +03:00
|
|
|
|
|
|
|
(when carp-dev
|
|
|
|
(load-lisp (str carp-dir "lisp/core_tests.carp")))
|
|
|
|
|
2016-01-15 12:17:26 +03:00
|
|
|
(load-lisp (str carp-dir "lisp/compiler.carp"))
|
2016-01-13 16:09:27 +03:00
|
|
|
|
2016-01-19 15:29:06 +03:00
|
|
|
(defn load-gl ()
|
|
|
|
(load-lisp (str carp-dir "lisp/glfw_test.carp")))
|
|
|
|
|
2016-01-18 15:43:59 +03:00
|
|
|
(when carp-dev
|
|
|
|
(do
|
2016-03-14 13:21:40 +03:00
|
|
|
(time (load-lisp (str carp-dir "lisp/compiler_tests.carp")))
|
2016-02-05 11:34:24 +03:00
|
|
|
(load-lisp (str carp-dir "lisp/examples.carp"))
|
|
|
|
(load-gl)
|
2016-01-29 19:21:35 +03:00
|
|
|
))
|
2016-01-18 16:27:46 +03:00
|
|
|
|
|
|
|
(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"))
|