urbit/main/bin/update.hoon

29 lines
794 B
Plaintext
Raw Normal View History

2013-09-29 00:21:18 +04:00
!:
:: /=main=/bin/update/hoon
2013-09-29 00:21:18 +04:00
::
=> .(-< `who=@p`-<)
|= [est=time eny=@uw]
2013-09-29 00:21:18 +04:00
|= ~
^- bowl
?: =(~zod who) [~ ~]
=+ bos==+(bos=(sein who) ?.(=(bos who) bos ~zod))
=+ wen=(scot %da (sub ~s5 est))
=+ ^= syn ^- (list ,@tas)
[%main %arvo %try ~]
2013-09-29 00:21:18 +04:00
:_ ~
^- (list gift)
:- [%la %leaf "updating..."]
%+ turn syn
|= des=@tas
~& [%reading `path`/(scot %p bos)/[des]/wen]
=+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/wen))
~& [%reading `path`/(scot %p who)/[des]/wen]
=+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/wen))
=+ sab=`saba`[bos des [0 let.der] (flop (turn hit.der |=(a=frog q.a)))]
=+ lum=(~(auld ze est owr) est %fine sab)
?~ lum
`gift`[%la %leaf "{(trip des)} failed to merge"]
?~ u.lum
`gift`[%la %leaf "{(trip des)} is up to date"]
`gift`[%ok des u.u.lum]