1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: checksums checksums.openssl splitting assocs
4 kernel io.files bootstrap.image sequences io namespaces
5 io.launcher math io.encodings.ascii ;
6 IN: bootstrap.image.upload
8 SYMBOL: upload-images-destination
10 : destination ( -- dest )
11 upload-images-destination get
12 "slava@factorcode.org:/var/www/factorcode.org/newsite/images/latest/"
15 : checksums ( -- temp ) "checksums.txt" temp-file ;
17 : boot-image-names ( -- seq ) images [ boot-image-name ] map ;
19 : compute-checksums ( -- )
23 [ openssl-md5 checksum-file hex-string print ]
28 : upload-images ( -- )
32 "temp/checksums.txt" , destination ,
33 ] { } make try-process ;
37 [ make-images compute-checksums upload-images ]