PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/extra/update/latest/latest.factor

http://github.com/abeaumont/factor
Unknown | 51 lines | 40 code | 11 blank | 0 comment | 0 complexity | 946d4c0866a61e62e9aaf66dba8bb899 MD5 | raw file
 1USING: kernel namespaces system io.files io.pathnames io.directories
 2bootstrap.image http.client update update.backup update.util ;
 3IN: update.latest
 4
 5! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 6
 7: git-pull-master ( -- )
 8  image parent-directory
 9    [
10      { "git" "pull" "git://factorcode.org/git/factor.git" "master" }
11      run-command
12    ]
13  with-directory ;
14
15! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
17: remote-latest-image ( -- url )
18  { "http://factorcode.org/images/latest/" my-boot-image-name } to-string ;
19
20: download-latest-image ( -- ) remote-latest-image download ;
21
22! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
23
24: rebuild-latest ( -- )
25  image parent-directory
26    [
27      backup
28      download-latest-image
29      make-clean
30      make
31      boot
32    ]
33  with-directory ;
34
35! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
36
37: update-latest ( -- )
38  image parent-directory
39    [
40      git-id
41      git-pull-master
42      git-id
43      = not
44        [ rebuild-latest ]
45      when
46    ]
47  with-directory ;
48
49! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
50
51MAIN: update-latest