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
|
path
|
||||||
"/usr/local/share/guile/"))))
|
"/usr/local/share/guile/"))))
|
||||||
((mosh)
|
((mosh)
|
||||||
(with-output-to-file
|
(call-with-temp-file "snow-mosh.scm"
|
||||||
(make-path (cond-expand (windows (get-environment-variable "TMP"))
|
(lambda (tmp-path out preserve)
|
||||||
(else "/tmp"))
|
(with-output-to-file tmp-path
|
||||||
"snowmosh")
|
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(display "(import (scheme base) (scheme write) (mosh config))")
|
(display "(import (scheme base) (scheme write) (mosh config))")
|
||||||
(newline)
|
(newline)
|
||||||
(display "(display (get-config \"library-path\"))")))
|
(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)
|
((larceny)
|
||||||
(list
|
(list
|
||||||
(make-path
|
(make-path
|
||||||
|
|
|
@ -41,15 +41,15 @@
|
||||||
'(kawa -e "(write (features))"))))
|
'(kawa -e "(write (features))"))))
|
||||||
(mosh "mosh" (mosh -v) #f
|
(mosh "mosh" (mosh -v) #f
|
||||||
,(delay
|
,(delay
|
||||||
(let ((tmpfile (string-append (cond-expand (windows (get-environment-variable "TMP"))
|
(call-with-temp-file "snow-mosh.scm"
|
||||||
(else "/tmp"))
|
(lambda (tmp-path out preserve)
|
||||||
"/snowmosh")))
|
(with-output-to-file tmp-path
|
||||||
(with-output-to-file
|
|
||||||
tmpfile
|
|
||||||
(lambda ()
|
(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
|
(process->sexp
|
||||||
`(mosh ,tmpfile)))))
|
`(mosh ,tmp-path))))))
|
||||||
(larceny "larceny" (larceny --version) "v0.98"
|
(larceny "larceny" (larceny --version) "v0.98"
|
||||||
,(delay '()))
|
,(delay '()))
|
||||||
(sagittarius "sagittarius" #f #f
|
(sagittarius "sagittarius" #f #f
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
(chibi pathname)
|
(chibi pathname)
|
||||||
(chibi process)
|
(chibi process)
|
||||||
(chibi string)
|
(chibi string)
|
||||||
|
(chibi temp-file)
|
||||||
(chibi uri))
|
(chibi uri))
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(chibi (import (chibi io)))
|
(chibi (import (chibi io)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue