Commit 9ccef9f4 authored by Pascal J. Bourguignon's avatar Pascal J. Bourguignon

Use sw_vers -productVersion to get macOS release.

parent 69ebc8ba
......@@ -239,18 +239,8 @@ System and distrib are keywords, release is a string."
(:darwin
(when (probe-file "/System/Library/Frameworks/AppKit.framework/AppKit")
(setf distrib :apple))
(let ((hostinfo (shell-command-to-string "hostinfo")))
(when hostinfo
(setf release (with-input-from-string (inp hostinfo)
(loop
:for line = (read-line inp nil nil)
:while line
:when (search "Darwin Kernel Version" line)
:return (let ((release (fourth (words line))))
(subseq release 0 (position #\: release)))
:finally (return :unknown))))
(setf release :unknown))))
#-(or linux darwin windowd)
(setf release (string-trim #(#\newline) (shell-command-to-string "sw_vers -productVersion"))))
#-(or linux darwin window)
(:unknown
(let ((host (trim (shell-command-to-string "hostinfo"))))
(cond
......@@ -261,10 +251,6 @@ System and distrib are keywords, release is a string."
(list system distrib release))))
(defun lisp-implementation-type-keyword ()
"Return the keyword specific to each implementation (as found in *features*),
or else interns the (lisp-implementation-type), with space substituted by dashes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment