Skip to content
Snippets Groups Projects
Commit ed5e1a79 authored by Kevin Rosenberg's avatar Kevin Rosenberg
Browse files

Add run-shell-command for Allegro and Lispworks

parent 13f31fe3
No related branches found
No related tags found
No related merge requests found
;;; This is asdf: Another System Definition Facility. $Revision: 1.30 $ ;;; This is asdf: Another System Definition Facility. $Revision: 1.31 $
;;; ;;;
;;; The canonical source for asdf is presently the cCLan CVS repository, ;;; The canonical source for asdf is presently the cCLan CVS repository,
;;; at <URL:http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/> ;;; at <URL:http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/>
...@@ -815,4 +815,27 @@ output to *trace-output*. Returns the shell's exit code." ...@@ -815,4 +815,27 @@ output to *trace-output*. Returns the shell's exit code."
(list "-c" command) (list "-c" command)
:input nil :output *trace-output*)))) :input nil :output *trace-output*))))
#+allegro
(defun run-shell-command (control-string &rest args)
"Interpolate ARGS into CONTROL-STRING as if by FORMAT, and
synchronously execute the result using a Bourne-compatible shell, with
output to *trace-output*. Returns the shell's exit code."
(let ((command (apply #'format nil control-string args)))
(format *trace-output* "; $ ~A~%" command)
(excl:run-shell-command
(make-array 3 :initial-contents (list "/bin/sh" "-c" command))
:input nil :output *trace-output*)))
#+lispworks
(defun run-shell-command (control-string &rest args)
"Interpolate ARGS into CONTROL-STRING as if by FORMAT, and
synchronously execute the result using a Bourne-compatible shell, with
output to *trace-output*. Returns the shell's exit code."
(let ((command (apply #'format nil control-string args)))
(format *trace-output* "; $ ~A~%" command)
(system:call-system-showing-output
command
:shell-type "/bin/sh"
:output-stream *trace-output*)))
(pushnew :asdf *features*) (pushnew :asdf *features*)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment