File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 :bug-tracker " https://github.com/rudolfochrist/ql-https/issues"
1010 :source-control (:git " https://github.com/rudolfochrist/ql-https.git" )
1111 :version (:read-file-line " version" )
12- :depends-on ((:require " uiop" ))
12+ :depends-on ((:require " uiop" ) ( :feature :sbcl :sb-md5 ) )
1313 :components ((:file " ql-https" ))
1414 :description " Enable HTTPS in Quicklisp"
1515 :long-description
Original file line number Diff line number Diff line change 4848 (end (position #\/ url :start start)))
4949 (subseq url start end))))
5050
51+ #+ sbcl
5152(defun md5 (file)
5253 " Returns md5sum of FILE"
53- (uiop :run-program (format nil " md5sum \" ~A \" | cut -d' ' -f 1" file)
54- :output ' (:string :stripped t )))
54+ (format nil " ~{ ~ 2,'0 x ~} " (coerce (sb-md5 :md5sum-file file) ' list)))
55+
56+ #- sbcl
57+ (defun md5 (file)
58+ " Returns md5sum of FILE"
59+ (let* ((output (uiop :run-program (list " md5sum" (namestring file)) :output :string ))
60+ (space-pos (position #\Space output)))
61+ (subseq output 0 space-pos)))
5562
5663(defun file-size (file)
5764 " Returns the size of FILE in bytes"
6269 " Checks that the md5 and size of FILE are as expected from the quicklisp
6370dist."
6471 (let ((release (ql-dist :find-release name)))
65- (unless (string= (ql-dist :archive-md5 release) (md5 file))
72+ (unless (string-equal (ql-dist :archive-md5 release) (md5 file))
6673 (error " md5 mismatch for ~A " name))
6774 (unless (= (ql-dist :archive-size release) (file-size file))
6875 (error " file size mismatch for ~A " name))))
You can’t perform that action at this time.
0 commit comments