factor/extra/mason/updates/updates.factor

27 lines
646 B
Factor
Raw Normal View History

! 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"
} ;
: updates-available? ( -- ? )
2008-09-16 00:20:33 -04:00
git-id
git-pull-cmd short-running-process
git-id
= not ;
: new-image-available? ( -- ? )
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 ;