Use OpenSSL MD5 for now, its faster
parent
707e6bf142
commit
eb2cd0b066
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
IN: bootstrap.image.download
|
IN: bootstrap.image.download
|
||||||
USING: http.client checksums checksums.md5 splitting assocs
|
USING: http.client checksums checksums.openssl splitting assocs
|
||||||
kernel io.files bootstrap.image sequences io ;
|
kernel io.files bootstrap.image sequences io ;
|
||||||
|
|
||||||
: url "http://factorcode.org/images/latest/" ;
|
: url "http://factorcode.org/images/latest/" ;
|
||||||
|
@ -12,8 +12,11 @@ kernel io.files bootstrap.image sequences io ;
|
||||||
|
|
||||||
: need-new-image? ( image -- ? )
|
: need-new-image? ( image -- ? )
|
||||||
dup exists?
|
dup exists?
|
||||||
[ [ md5 checksum-file hex-string ] [ download-checksums at ] bi = not ]
|
[
|
||||||
[ drop t ] if ;
|
[ openssl-md5 checksum-file hex-string ]
|
||||||
|
[ download-checksums at ]
|
||||||
|
bi = not
|
||||||
|
] [ drop t ] if ;
|
||||||
|
|
||||||
: download-image ( arch -- )
|
: download-image ( arch -- )
|
||||||
boot-image-name dup need-new-image? [
|
boot-image-name dup need-new-image? [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: http.client checksums checksums.md5 splitting assocs
|
USING: http.client checksums checksums.openssl splitting assocs
|
||||||
kernel io.files bootstrap.image sequences io namespaces
|
kernel io.files bootstrap.image sequences io namespaces
|
||||||
io.launcher math io.encodings.ascii ;
|
io.launcher math io.encodings.ascii ;
|
||||||
IN: bootstrap.image.upload
|
IN: bootstrap.image.upload
|
||||||
|
@ -19,7 +19,9 @@ SYMBOL: upload-images-destination
|
||||||
: compute-checksums ( -- )
|
: compute-checksums ( -- )
|
||||||
checksums ascii [
|
checksums ascii [
|
||||||
boot-image-names [
|
boot-image-names [
|
||||||
[ write bl ] [ md5 checksum-file hex-string print ] bi
|
[ write bl ]
|
||||||
|
[ openssl-md5 checksum-file hex-string print ]
|
||||||
|
bi
|
||||||
] each
|
] each
|
||||||
] with-file-writer ;
|
] with-file-writer ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue