]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/update/latest/latest.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / unmaintained / update / latest / latest.factor
1
2 USING: kernel namespaces system io.files bootstrap.image http.client
3        builder.util update update.backup ;
4
5 IN: update.latest
6
7 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8
9 : git-pull-master ( -- )
10   image parent-directory
11     [
12       { "git" "pull" "git://factorcode.org/git/factor.git" "master" }
13       run-command
14     ]
15   with-directory ;
16
17 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18
19 : remote-latest-image ( -- url )
20   { "http://factorcode.org/images/latest/" my-boot-image-name } to-string ;
21
22 : download-latest-image ( -- ) remote-latest-image download ;
23
24 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25
26 : rebuild-latest ( -- )
27   image parent-directory
28     [
29       backup
30       download-latest-image
31       make-clean
32       make
33       boot
34     ]
35   with-directory ;
36
37 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
38
39 : update-latest ( -- )
40   image parent-directory
41     [
42       git-id
43       git-pull-master
44       git-id
45       = not
46         [ rebuild-latest ]
47       when
48     ]
49   with-directory ;
50
51 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
52
53 MAIN: update-latest