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 make
5 io.launcher math io.encodings.ascii io.files.temp io.pathnames
7 IN: bootstrap.image.upload
9 SYMBOL: upload-images-destination
11 : destination ( -- dest )
12 upload-images-destination get
13 "slava@factorcode.org:/var/www/factorcode.org/newsite/images/latest/"
16 : checksums ( -- temp ) "checksums.txt" temp-file ;
18 : boot-image-names ( -- seq ) images [ boot-image-name ] map ;
20 : compute-checksums ( -- )
24 [ openssl-md5 checksum-file hex-string print ]
29 : upload-images ( -- )
33 "temp/checksums.txt" , destination ,
34 ] { } make try-process ;
38 [ make-images compute-checksums upload-images ]