diff --git a/inferior-shell.asd b/inferior-shell.asd index ce5b47ed5e2c1e4b922a9d29e3748de5f18d5585..d9e1f0155af1b4a54827390f5ed794832b907f4b 100644 --- a/inferior-shell.asd +++ b/inferior-shell.asd @@ -1,10 +1,12 @@ ;;; -*- 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")) @@ -17,5 +19,5 @@ (: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)) diff --git a/pkgdcl.lisp b/pkgdcl.lisp index 16d6fb669f0fee8ccd1ee54ec573e2382171a1ca..ab1f9d0ad7ff05ce4eb0c4838ea20034c53a71f9 100644 --- a/pkgdcl.lisp +++ b/pkgdcl.lisp @@ -2,8 +2,9 @@ (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 diff --git a/process-spec.lisp b/process-spec.lisp index e8dfafff8188c10badd3df6b23799b78a8b4c1fb..cc3604f6f57c02a1409c0d9bc5c1aa74c0914d85 100644 --- a/process-spec.lisp +++ b/process-spec.lisp @@ -73,7 +73,7 @@ (: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)) @@ -84,7 +84,7 @@ (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) @@ -94,7 +94,7 @@ (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 @@ -330,14 +330,14 @@ (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