Browse files

Avoid /bin/sh.

  • Loading branch information...
1 parent ce892f1 commit 4766d2031d288b9b1e045ec3d138681eab5f1ac6 @orivej committed Nov 30, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 README.md
  2. +3 −2 quickdist.lisp
View
2 README.md
@@ -1,6 +1,6 @@
# Overview
-Quickdist creates and updates Quicklisp distributions from a directory of local projects. It maintains distinfo.txt, releases.txt, systems.txt and source archive - all that is needed for a distribution. Currently it requires external utilities to work: /bin/tar, /bin/sh, /usr/bin/md5sum, sha1sum.
+Quickdist creates and updates Quicklisp distributions from a directory of local projects. It maintains distinfo.txt, releases.txt, systems.txt and source archive - all that is needed for a distribution. Currently it requires external utilities to work: /bin/tar, /usr/bin/md5sum, /usr/bin/sha1sum.
# API
View
5 quickdist.lisp
@@ -54,10 +54,11 @@ system-index-url: {base-url}/{name}/{version}/systems.txt
(subseq s 0 (position #\Space s))))
(defun md5sum (path)
- (external-program-word "/usr/bin/md5sum" `(,(princ-to-string path))))
+ (external-program-word "/usr/bin/md5sum" (list (princ-to-string path))))
(defun tar-content-sha1 (path)
- (external-program-word "/bin/sh" `("-c" ,(format nil "tar xOf \"~a\" | sha1sum" path))))
+ (let ((tar (external-program:start "/bin/tar" (list "-xOf" path) :output :stream)))
+ (external-program-word "/usr/bin/sha1sum" nil :input (external-program:process-output-stream tar))))
(defun last-directory (path)
(first (last (pathname-directory path))))

0 comments on commit 4766d20

Please sign in to comment.