 
 : updates-available? ( -- ? )
   git-id
-  git-pull run-process drop
+  git-pull try-process
   git-id
   = not ;
 

: build-loop ( -- )
  builds-check
  [
    builds "/factor" append cd
    updates-available? new-image-available? or
      [ build ]
    when
  ]
  failsafe
  5 minutes sleep
  build-loop ;



! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

: compress-image ( -- ) { "bzip2" my-boot-image-name } to-strings try-process ;

! : build ( -- )
!   [ (build) ] try
!   builds cd stamp> cd
!   [ send-builder-email ] try
!   { "rm" "-rf" "factor" } [ ] run-or-bail
!   [ compress-image ] try ;

: build ( -- )
  [
    (build)
    build-dir
      [
        { "rm" "-rf" "factor" } try-process
        compress-image
      ]
    with-directory
  ]
  try
  send-builder-email ;

! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

