mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-04 11:46:37 +02:00
Use proper utilities for temporary file handling
This commit is contained in:
parent
4dfdacf3ac
commit
16b771f4d2
3 changed files with 18 additions and 18 deletions
|
@ -1399,15 +1399,14 @@
|
|||
path
|
||||
"/usr/local/share/guile/"))))
|
||||
((mosh)
|
||||
(with-output-to-file
|
||||
(make-path (cond-expand (windows (get-environment-variable "TMP"))
|
||||
(else "/tmp"))
|
||||
"snowmosh")
|
||||
(call-with-temp-file "snow-mosh.scm"
|
||||
(lambda (tmp-path out preserve)
|
||||
(with-output-to-file tmp-path
|
||||
(lambda ()
|
||||
(display "(import (scheme base) (scheme write) (mosh config))")
|
||||
(newline)
|
||||
(display "(display (get-config \"library-path\"))")))
|
||||
(list (make-path (process->sexp '(mosh /tmp/snowmosh)) "lib")))
|
||||
(list (make-path (process->string `(mosh ,tmp-path)) "lib")))))
|
||||
((larceny)
|
||||
(list
|
||||
(make-path
|
||||
|
|
|
@ -41,15 +41,15 @@
|
|||
'(kawa -e "(write (features))"))))
|
||||
(mosh "mosh" (mosh -v) #f
|
||||
,(delay
|
||||
(let ((tmpfile (string-append (cond-expand (windows (get-environment-variable "TMP"))
|
||||
(else "/tmp"))
|
||||
"/snowmosh")))
|
||||
(with-output-to-file
|
||||
tmpfile
|
||||
(call-with-temp-file "snow-mosh.scm"
|
||||
(lambda (tmp-path out preserve)
|
||||
(with-output-to-file tmp-path
|
||||
(lambda ()
|
||||
(display "(import (scheme base) (scheme write) (mosh config)) (display (features))")))
|
||||
(display "(import (scheme base) (scheme write) (mosh config))")
|
||||
(newline)
|
||||
(display "(display (features))")))
|
||||
(process->sexp
|
||||
`(mosh ,tmpfile)))))
|
||||
`(mosh ,tmp-path))))))
|
||||
(larceny "larceny" (larceny --version) "v0.98"
|
||||
,(delay '()))
|
||||
(sagittarius "sagittarius" #f #f
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
(chibi pathname)
|
||||
(chibi process)
|
||||
(chibi string)
|
||||
(chibi temp-file)
|
||||
(chibi uri))
|
||||
(cond-expand
|
||||
(chibi (import (chibi io)))
|
||||
|
|
Loading…
Add table
Reference in a new issue