Merge branch 'master' of http://factorcode.org/git/factor
commit
b60f8482e5
|
@ -18,20 +18,19 @@ CONSTANT: url URL" http://factorcode.org/images/latest/"
|
||||||
bi = not
|
bi = not
|
||||||
] [ drop t ] if ;
|
] [ drop t ] if ;
|
||||||
|
|
||||||
: download-image ( arch -- )
|
: verify-image ( image -- )
|
||||||
url swap boot-image-name >url derive-url download ;
|
need-new-image? [ "Boot image corrupt" throw ] when ;
|
||||||
|
|
||||||
: maybe-download-image ( arch -- )
|
: download-image ( image -- )
|
||||||
dup boot-image-name need-new-image? [
|
[ url swap >url derive-url download ]
|
||||||
dup download-image
|
[ verify-image ]
|
||||||
need-new-image? [
|
bi ;
|
||||||
"Boot image corrupt, or checksums.txt on server out of date" throw
|
|
||||||
] when
|
|
||||||
] [
|
|
||||||
"Boot image up to date" print
|
|
||||||
drop
|
|
||||||
] if ;
|
|
||||||
|
|
||||||
: download-my-image ( -- ) my-arch maybe-download-image ;
|
: maybe-download-image ( image -- ? )
|
||||||
|
dup need-new-image?
|
||||||
|
[ download-image t ] [ drop f ] if ;
|
||||||
|
|
||||||
|
: download-my-image ( -- )
|
||||||
|
my-arch boot-image-name maybe-download-image drop ;
|
||||||
|
|
||||||
MAIN: download-my-image
|
MAIN: download-my-image
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
! Copyright (C) 2008 Eduardo Cavazos, Slava Pestov.
|
! Copyright (C) 2008, 2010 Eduardo Cavazos, Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel io.launcher bootstrap.image.download
|
USING: kernel io.launcher bootstrap.image.download
|
||||||
mason.common mason.platform ;
|
mason.common mason.platform ;
|
||||||
|
@ -20,8 +20,7 @@ IN: mason.updates
|
||||||
= not ;
|
= not ;
|
||||||
|
|
||||||
: new-image-available? ( -- ? )
|
: new-image-available? ( -- ? )
|
||||||
boot-image-name need-new-image?
|
boot-image-name maybe-download-image ;
|
||||||
[ boot-image-arch download-image t ] [ f ] if ;
|
|
||||||
|
|
||||||
: new-code-available? ( -- ? )
|
: new-code-available? ( -- ? )
|
||||||
updates-available?
|
updates-available?
|
||||||
|
|
Loading…
Reference in New Issue