2010-05-25 17:15:55 -04:00
|
|
|
! Copyright (C) 2008, 2010 Eduardo Cavazos, Slava Pestov.
|
2008-09-16 00:20:33 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2010-06-24 13:45:26 -04:00
|
|
|
USING: bootstrap.image.download io.directories io.launcher
|
|
|
|
|
kernel mason.common mason.platform ;
|
2008-09-16 00:20:33 -04:00
|
|
|
IN: mason.updates
|
|
|
|
|
|
|
|
|
|
: git-pull-cmd ( -- cmd )
|
|
|
|
|
{
|
|
|
|
|
"git"
|
|
|
|
|
"pull"
|
|
|
|
|
"--no-summary"
|
|
|
|
|
"git://factorcode.org/git/factor.git"
|
|
|
|
|
"master"
|
|
|
|
|
} ;
|
|
|
|
|
|
2010-06-22 15:40:15 -04:00
|
|
|
: updates-available? ( -- ? )
|
2008-09-16 00:20:33 -04:00
|
|
|
git-id
|
|
|
|
|
git-pull-cmd short-running-process
|
|
|
|
|
git-id
|
|
|
|
|
= not ;
|
|
|
|
|
|
|
|
|
|
: new-image-available? ( -- ? )
|
2010-05-25 17:15:55 -04:00
|
|
|
boot-image-name maybe-download-image ;
|
2008-09-16 00:20:33 -04:00
|
|
|
|
|
|
|
|
: new-code-available? ( -- ? )
|
2010-06-24 13:45:26 -04:00
|
|
|
updates-available? new-image-available? or ;
|