diff --git a/extra/builder/builder.factor b/extra/builder/builder.factor index 0c9f4ab099..870c896542 100644 --- a/extra/builder/builder.factor +++ b/extra/builder/builder.factor @@ -61,6 +61,13 @@ VAR: stamp ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +: copy-image ( -- ) + "../../factor/" my-arch boot-image-name append + my-arch boot-image-name + copy-file ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + : factor-binary ( -- name ) os { { "macosx" [ "./Factor.app/Contents/MacOS/factor" ] } @@ -112,7 +119,9 @@ SYMBOL: build-status make-vm [ "vm compile error" print "../compile-log" cat ] run-or-bail - [ retrieve-image ] [ "Image download error" print throw ] recover + ! [ retrieve-image ] [ "Image download error" print throw ] recover + + copy-image bootstrap [ "Bootstrap error" print "../boot-log" cat ] run-or-bail @@ -158,6 +167,8 @@ SYMBOL: builder-recipients ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +USE: bootstrap.image.download + : git-pull ( -- desc ) { "git" @@ -173,11 +184,17 @@ SYMBOL: builder-recipients git-id = not ; +: new-image-available? ( -- ? ) + my-arch boot-image-name need-new-image? + [ download-my-image t ] + [ f ] + if ; + : build-loop ( -- ) builds-check [ builds "/factor" append cd - updates-available? + updates-available? new-image-available? or [ build ] when ] diff --git a/extra/builder/util/util.factor b/extra/builder/util/util.factor index f9eb17c565..fd985f77cf 100644 --- a/extra/builder/util/util.factor +++ b/extra/builder/util/util.factor @@ -83,4 +83,11 @@ TUPLE: process* arguments stdin stdout stderr timeout ; USING: bootstrap.image bootstrap.image.download io.streams.null ; -: retrieve-image ( -- ) [ my-arch download-image ] with-null-stream ; \ No newline at end of file +: retrieve-image ( -- ) [ my-arch download-image ] with-null-stream ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: copy-image ( -- ) + "../../factor/" my-arch boot-image-name append + my-arch boot-image-name + copy-file ; \ No newline at end of file