Use temp-file
parent
da575528cf
commit
5a8ab4f6ee
|
@ -6,16 +6,18 @@ bootstrap.image sequences io namespaces io.launcher math ;
|
|||
|
||||
: destination "slava@factorcode.org:www/images/latest/" ;
|
||||
|
||||
: checksums "checksums.txt" temp-file ;
|
||||
|
||||
: boot-image-names images [ boot-image-name ] map ;
|
||||
|
||||
: compute-checksums ( -- )
|
||||
"checksums.txt" [
|
||||
checksums [
|
||||
boot-image-names [ dup write bl file>md5str print ] each
|
||||
] with-file-writer ;
|
||||
|
||||
: upload-images ( -- )
|
||||
[
|
||||
"scp" , boot-image-names % "checksums.txt" , destination ,
|
||||
"scp" , boot-image-names % checksums , destination ,
|
||||
] { } make try-process ;
|
||||
|
||||
: new-images ( -- )
|
||||
|
|
|
@ -39,12 +39,12 @@ IN: bunny.model
|
|||
[ normals ] 2keep 3array
|
||||
] time ;
|
||||
|
||||
: model-path "bun_zipper.ply" ;
|
||||
: model-path "bun_zipper.ply" temp-file ;
|
||||
|
||||
: model-url "http://factorcode.org/bun_zipper.ply" ;
|
||||
|
||||
: maybe-download ( -- path )
|
||||
model-path resource-path dup exists? [
|
||||
model-path dup exists? [
|
||||
"Downloading bunny from " write
|
||||
model-url dup print flush
|
||||
over download-to
|
||||
|
|
Loading…
Reference in New Issue