0.9.1.41:
[sbcl.git] / contrib / asdf-install / installer.lisp
index 656c913..3acb93a 100644 (file)
@@ -11,9 +11,9 @@
   (let ((path (pathname name)))
     (if (pathname-name path)
        (merge-pathnames
-        (make-pathname :directory `(:relative ,(pathname-name path))
-                       :name "")
-        path)
+        (make-pathname :directory `(:relative ,(pathname-name path)))
+        (make-pathname :directory (pathname-directory path)
+                       :host (pathname-host path)))
        path)))
 
 (defvar *sbcl-home* (directorify (posix-getenv "SBCL_HOME")))
     (socket-connect
      s (car (host-ent-addresses (get-host-by-name (url-host (or *proxy* url)))))
      (url-port (or  *proxy* url)))
-    (let ((stream (socket-make-stream s :input t :output t :buffering :full)))
+    (let ((stream (socket-make-stream s :input t :output t :buffering :full :external-format :iso-8859-1)))
       ;; we are exceedingly unportable about proper line-endings here.
       ;; Anyone wishing to run this under non-SBCL should take especial care
       (format stream "GET ~A HTTP/1.0~%Host: ~A~%Cookie: CCLAN-SITE=~A~%~%"
        (format t "Downloading ~A bytes from ~A ..."
                (if length length "some unknown number of") url)
        (force-output)
-       (with-open-file (o file-name :direction :output)
+       (with-open-file (o file-name :direction :output :external-format :iso-8859-1)
          (if length
              (let ((buf (make-array length
                                     :element-type
-                                    (stream-element-type stream)  )))
+                                    (stream-element-type stream))))
                (read-sequence buf stream)
                (write-sequence buf o)) 
              (sb-executable:copy-stream stream o))))
       (restart-case 
          (verify-gpg-signature/url url file-name)
        (skip-gpg-check (&rest rest)
-         :report "Don't ckeck GPG signature for this package"
+         :report "Don't check GPG signature for this package"
          nil)))))
 
 (defun read-until-eof (stream)
   (let* ((tar
          (with-output-to-string (o)
            (or
-            (sb-ext:run-program "tar"
+            (sb-ext:run-program #-darwin "tar"
+                                #+darwin "gnutar"
                                 (list "-C" (namestring source)
                                       "-xzvf" (namestring packagename))
                                 :output o
             (one-iter packages)))
       (let ((p (merge-pathnames "trusted-uids.lisp" *dot-sbcl*)))
        (ensure-directories-exist p)
-       (with-open-file (out p :direction :output)
+       (with-open-file (out p :direction :output :if-exists :supersede)
          (with-standard-io-syntax
            (prin1 *trusted-uids* out))))
       (dolist (l *temporary-files*)