X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=candle;a=blobdiff_plain;f=src%2Fmain%2Flocal%2Flocal.lisp;h=8eded5aa4f42eedcb905ea05a04b04dc96ce275d;hp=bce245b985783a8ed6b44a282004b675b6a98313;hb=6d4f6ed548e71c00114b5102e725887e379dbc0e;hpb=b20fb177f8305dd8739d57c1bd832bd7a98ab25b diff --git a/src/main/local/local.lisp b/src/main/local/local.lisp index bce245b..8eded5a 100644 --- a/src/main/local/local.lisp +++ b/src/main/local/local.lisp @@ -1,20 +1,29 @@ (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)))