urbit/main/bin/update.hoon

40 lines
1.2 KiB
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`-<)
2014-06-02 22:41:53 +04:00
=> %= .
+
=> +
|%
++ merge
|= [gem=germ who=@p bos=@p est=time]
2014-07-24 19:11:40 +04:00
|= [der=dome owr=dome ran=rang des=desk]
2014-06-02 22:41:53 +04:00
^- gift
2014-07-24 19:11:40 +04:00
~& der
=+ sab=`saba`[bos des [0 let.der] der]
=+ lum=`(unit (unit mizu))`(~(auld ze est owr ran) gem who des sab)
2014-06-02 22:41:53 +04:00
?~ lum
^- gift
:+ %la %leaf
2014-06-07 21:42:48 +04:00
"{(trip des)} failed to apply, please rerun with a merge option"
2014-06-02 22:41:53 +04:00
?~ u.lum
`gift`[%la %leaf "{(trip des)} is up to date"]
2014-07-24 19:11:40 +04:00
`gift`[%og des u.u.lum]
2014-06-02 22:41:53 +04:00
--
==
|= [est=time eny=@uw]
2014-05-20 22:53:49 +04:00
|= gem=$|([germ ~] ~)
2013-12-30 02:27:44 +04:00
=+ wen=(scot %da (need (slaw %da +>-:/===))) :: heinous
?: =(~zod who) [~ ~]
2014-06-02 22:41:53 +04:00
=+ bos==+(bos=(sein who) ?:(=(bos who) ~zod bos))
2014-07-24 19:11:40 +04:00
=+ syn=`(list ,@tas)`~[%main %try %arvo]
2014-06-02 22:41:53 +04:00
=+ ^= desks
%+ turn syn
2014-07-24 19:11:40 +04:00
|= des=desk
=+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/[wen]))
=+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/[wen]))
=+ ran=((hard rang) .^(%cu /(scot %p bos)/[des]/[wen])) :: global store
[der owr ran des]
2014-06-02 22:41:53 +04:00
=+ gifts=`(list gift)`(turn desks (merge ?~(gem %fine -.gem) who bos est))
`bowl`[[[%la %leaf "updating..."] gifts] ~]