;;; -*- Lisp -*-
+(in-package :asdf)
(defsystem :inferior-shell
- :defsystem-depends-on (:asdf)
- :depends-on (:asdf :xcvb-utils :fare-quasiquote-extras :fare-mop
+ :defsystem-depends-on (:asdf :asdf-driver)
+ :depends-on (:asdf-driver :fare-utils :alexandria :fare-quasiquote-extras :fare-mop
#+sbcl :sb-posix)
:description "spawn local or remote processes and shell pipes"
+ :around-compile "asdf-driver:call-with-safe-io-syntax"
:components
((:file "pkgdcl")
(:file "process-spec" :depends-on ("pkgdcl"))
(:file "run-sbcl" :depends-on ("process-spec" "macros" "run-generic"))))
(defmethod perform ((op test-op) (system (eql (find-system :inferior-shell))))
- (asdf:load-system :inferior-shell-test)
- (funcall (asdf::find-symbol* :test-suite :inferior-shell-test)))
+ (load-system :inferior-shell-test)
+ (symbol-call :inferior-shell-test :test-suite))
(in-package :cl)
-(defpackage :inferior-shell
- (:use :cl :xcvb-utils :optima :named-readtables :fare-mop)
+(asdf/package:define-package :inferior-shell
+ (:mix :fare-utils :alexandria :asdf/driver)
+ (:use :cl :optima :named-readtables :fare-mop)
(:export
#:run #:run/s #:run/ss #:run/lines
#:simple-command-line-token #:token-string
(:documentation "Print a process specification in a way suitable for consumption by a shell"))
(defmethod print-process-spec ((r file-redirection) &optional s)
- (with-output-stream (s)
+ (with-output (s)
(with-slots (fd symbol pathname) r
(when (eq symbol '!)
(error "Can't print ad-hoc redirection ~S" r))
(escape-command (list pathname) s))))
(defmethod print-process-spec ((r fd-redirection) &optional s)
- (with-output-stream (s)
+ (with-output (s)
(with-slots (new-fd old-fd) r
(check-small-fd old-fd)
(check-small-fd new-fd)
(otherwise (format s "~D>& ~D" new-fd old-fd))))))
(defmethod print-process-spec ((r close-redirection) &optional s)
- (with-output-stream (s)
+ (with-output (s)
(with-slots (old-fd) r
(check-small-fd old-fd)
(case old-fd
(defmethod print-process-spec ((spec command-spec) &optional s)
(with-slots (arguments redirections) spec
- (with-output-stream (s)
+ (with-output (s)
(escape-command arguments s)
(when redirections
(loop :for r :in redirections :do
(princ " " s) (print-process-spec r s))))))
(defun print-process-sequence-joined (spec separator empty s &optional tail)
- (with-output-stream (s)
+ (with-output (s)
(let ((processes (sequence-processes spec)))
(if processes
(progn