mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
Ensure that path is checked for in update-hg and update-git.
This commit is contained in:
parent
32e380a288
commit
1ff35d0fc2
|
|
@ -3,21 +3,24 @@
|
|||
(:use :cl :roswell.util))
|
||||
(in-package :roswell.update.git)
|
||||
|
||||
(defun git (path)
|
||||
(unless (pathnamep path)
|
||||
(setf path (make-pathname
|
||||
:type nil :name nil
|
||||
:defaults (asdf:system-source-file (asdf:find-system path)))))
|
||||
(when (probe-file (merge-pathnames ".git/" path))
|
||||
(format *error-output* "git pull on ~A~%" path)
|
||||
(unless (roswell.util:which "git")
|
||||
(format *error-output* "git command not found~%")
|
||||
(ros:quit 1))
|
||||
(multiple-value-bind (o e exit-code)
|
||||
(uiop/run-program:run-program
|
||||
`(,(sh) "-lc" ,(format nil "cd ~S;git pull" (uiop:native-namestring path)))
|
||||
:output t :error-output t :ignore-error-status t)
|
||||
(declare (ignore o e))
|
||||
(unless (zerop exit-code)
|
||||
(ros:quit exit-code)))
|
||||
t))
|
||||
(defun git (&rest args)
|
||||
(if (car args)
|
||||
(let ((path (car args)))
|
||||
(unless (pathnamep path)
|
||||
(setf path (make-pathname
|
||||
:type nil :name nil
|
||||
:defaults (asdf:system-source-file (asdf:find-system path)))))
|
||||
(when (probe-file (merge-pathnames ".git/" path))
|
||||
(format *error-output* "git pull on ~A~%" path)
|
||||
(unless (roswell.util:which "git")
|
||||
(format *error-output* "git command not found~%")
|
||||
(ros:quit 1))
|
||||
(multiple-value-bind (o e exit-code)
|
||||
(uiop/run-program:run-program
|
||||
`(,(sh) "-lc" ,(format nil "cd ~S;git pull" (uiop:native-namestring path)))
|
||||
:output t :error-output t :ignore-error-status t)
|
||||
(declare (ignore o e))
|
||||
(unless (zerop exit-code)
|
||||
(ros:quit exit-code)))
|
||||
t))
|
||||
(format *error-output* "No path supplied")))
|
||||
|
|
|
|||
|
|
@ -3,21 +3,24 @@
|
|||
(:use :cl :roswell.util))
|
||||
(in-package :roswell.update.hg)
|
||||
|
||||
(defun hg (path)
|
||||
(unless (pathnamep path)
|
||||
(setf path (make-pathname
|
||||
:type nil :name nil
|
||||
:defaults (asdf:system-source-file (asdf:find-system path)))))
|
||||
(when (probe-file (merge-pathnames ".hg/" path))
|
||||
(format *error-output* "hg pull and update on ~A~%" path)
|
||||
(unless (roswell.util:which "hg")
|
||||
(format *error-output* "hg command not found~%")
|
||||
(ros:quit 1))
|
||||
(multiple-value-bind (o e exit-code)
|
||||
(uiop/run-program:run-program
|
||||
`(,(sh) "-lc" ,(format nil "cd ~S;hg pull && hg update" (uiop:native-namestring path)))
|
||||
:output t :error-output t :ignore-error-status t)
|
||||
(declare (ignore o e))
|
||||
(unless (zerop exit-code)
|
||||
(ros:quit exit-code)))
|
||||
t))
|
||||
(defun hg (&rest args)
|
||||
(if (car args)
|
||||
(let ((path (car args)))
|
||||
(unless (pathnamep path)
|
||||
(setf path (make-pathname
|
||||
:type nil :name nil
|
||||
:defaults (asdf:system-source-file (asdf:find-system path)))))
|
||||
(when (probe-file (merge-pathnames ".hg/" path))
|
||||
(format *error-output* "hg pull and update on ~A~%" path)
|
||||
(unless (roswell.util:which "hg")
|
||||
(format *error-output* "hg command not found~%")
|
||||
(ros:quit 1))
|
||||
(multiple-value-bind (o e exit-code)
|
||||
(uiop/run-program:run-program
|
||||
`(,(sh) "-lc" ,(format nil "cd ~S;hg pull && hg update" (uiop:native-namestring path)))
|
||||
:output t :error-output t :ignore-error-status t)
|
||||
(declare (ignore o e))
|
||||
(unless (zerop exit-code)
|
||||
(ros:quit exit-code)))
|
||||
t))
|
||||
(format *error-output* "No path supplied")))
|
||||
|
|
|
|||
Loading…
Reference in a new issue