Permalink
Browse files

make location of GNU tar configurable

  • Loading branch information...
1 parent 2043b59 commit e1f151ef2b5db3813199036ea10a04813c1fee8d Valeriy Zamarayev committed Dec 25, 2012
Showing with 7 additions and 3 deletions.
  1. +2 −1 package.lisp
  2. +5 −2 quickdist.lisp
View
3 package.lisp
@@ -17,4 +17,5 @@
#:*distinfo-file-template*
#:*dist-dir-template*
#:*archive-dir-template*
- #:*archive-url-template*))
+ #:*archive-url-template*
+ #:*gnutar*))
View
7 quickdist.lisp
@@ -12,6 +12,9 @@ system-index-url: {base-url}/{name}/{version}/systems.txt
(defparameter *archive-dir-template* "{dists-dir}/{name}/archive")
(defparameter *archive-url-template* "{base-url}/{name}/archive")
+(defparameter *gnutar* "/bin/tar"
+ "Location of the GNU TAR program")
+
(defvar *template-readtable*
(let ((readtable (copy-readtable)))
(set-syntax-from-char #\} #\) readtable)
@@ -54,7 +57,7 @@ system-index-url: {base-url}/{name}/{version}/systems.txt
(defun tar-content-sha1 (path)
(let ((octets (babel-streams:with-output-to-sequence (buffer)
- (external-program:run "/bin/tar" (list "-xOf" path) :output buffer))))
+ (external-program:run *gnutar* (list "-xOf" path) :output buffer))))
(ironclad:byte-array-to-hex-string
(ironclad:digest-sequence :sha1 (copy-seq octets)))))
@@ -65,7 +68,7 @@ system-index-url: {base-url}/{name}/{version}/systems.txt
(let* ((mtime (format-date (effective-mtime source-path)))
(name (format nil "~a-~a" (last-directory source-path) mtime))
(out-path (make-pathname :name name :type "tgz" :defaults (truename destdir-path))))
- (external-program:run "/bin/tar" (list "-C" (namestring source-path) "."
+ (external-program:run *gnutar* (list "-C" (namestring source-path) "."
"-czf" (namestring out-path)
"--transform" (format nil "s#^.#~a#" name))
:output *standard-output* :error *error-output*)

0 comments on commit e1f151e

Please sign in to comment.