(asdf:defsystem candle-local
:pathname "src/main/local"
- :components ((:file "local")))
+ :components ((:file "local") (:file "config")))
(in-package #:candle-local)
+(defvar *rsync-exec*)
+(defvar *candle-location*)
+
(defmethod candle:process-job-in-system ((job-system (eql :local)) job)
(let
((work-dir (format nil "~Awork/" candle:*candle-dir*))
- (result nil))
+ (out nil)
+ (code nil))
(sb-ext:run-program
- "/bin/cp"
+ *rsync-exec*
(list
- "-ap"
+ "-az"
+ "--delete"
(candle:project-dir (candle:job-project job))
work-dir))
- (let*
- ((*default-pathname-defaults* (pathname work-dir))
- (*error-output* (make-broadcast-stream))
- (output
- (with-output-to-string (*standard-output*)
- (setf result (candle:run)))))
- (sb-ext:delete-directory work-dir :recursive t)
- (values result output))))
+ (setf out
+ (with-output-to-string (out-str)
+ (setf code
+ (sb-ext:process-exit-code
+ (sb-ext:run-program
+ *candle-location*
+ (list "run")
+ :directory work-dir
+ :output out-str
+ :error out-str
+ :wait t)))))
+ (values (zerop code) out)))