projects
/
scheme.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix up typechecking of case
[scheme.git]
/
platform.scm
1
(define (slurp ip)
2
(with-output-to-string
3
(lambda ()
4
(let f ()
5
(let ([c (read-char ip)])
6
(unless (eof-object? c)
7
(write-char c)
8
(f)))))))
9
10
(define (trim s)
11
(if (<= (string-length s) 0)
12
s
13
(if (char-whitespace?
14
(string-ref s (- (string-length s) 1)))
15
(trim (substring s 0 (- (string-length s) 1)))
16
s)))
17
18
(define host-os
19
(string->symbol
20
(string-downcase
21
(trim (slurp (car (process "uname")))))))
22