3 (defun import-package (pkg)
4 (asdf:load-system pkg))
7 (format t "~%~c[1;33mRunning ~:(~A~)~c[0m~%" #\Esc (getf task :name) #\Esc)
9 (eval (getf task :directions))
10 (progn (format t "~c[1;32m- ~:(~A~) Passed!~c[0m~%" #\Esc (getf task :name) #\Esc) t)
11 (format t "~c[1;31m- ~:(~A~) Failed!~c[0m~%" #\Esc (getf task :name) #\Esc)))
18 RESULT: a boolean, whether the process was successful
22 Runs the script specified by the .candle file in the current directory.
23 When completed, the boolean will be returned if it was successful or not."
25 (not (probe-file ".candle"))
27 (with-open-file (str ".candle")
28 (asdf:initialize-source-registry `(:source-registry (:tree ,(car (directory "."))) :INHERIT-CONFIGURATION))
29 (mapcar #'import-package (cdr (read str)))
31 ((candle-definition (read str)))
32 (format t "Running tasks for ~(~A~)~%" (getf candle-definition :name))
33 (every #'identity (mapcar #'run-task (getf candle-definition :tasks)))))))