Handbook
Glossary
with-tar-gz ( path quot -- )
Vocabulary
build-from-source
Inputs
path
an
object
quot
an
object
Outputs
None
Definition
USING:
calendar
calendar.format
formatting
http.download
io
io.directories
io.encodings.utf8
io.files
io.launcher
io.pathnames
kernel
sequences
splitting
;
IN:
build-from-source
:
with-tar-gz
( path quot -- )
[
[
download-once
[
{
"tar"
"xvfz"
}
swap
suffix
try-process
]
[
".tar.gz"
?tail
drop
]
bi
]
]
dip
[
with-directory
now
timestamp>rfc3339
]
curry
compose
[
[
"- building..."
write
]
]
dip
[
dip
utf8
set-file-contents
"done!"
print
]
curry
compose
[
[
dup
"build-from-source considering tar.gz %s"
sprintf
print
dup
file-name
".tar.gz"
?tail
drop
check-build-completed
[
2nip
"- already built at %s"
sprintf
print
]
]
curry
]
dip
[
if*
]
curry
compose
with-build-from-source-cpu-directory
;
inline