shrub/main/bin/update.hoon

60 lines
1.9 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
=> %= .
+
=> +
|%
2014-08-01 18:54:31 +04:00
:: from pony.hoon, so we don't have to pull it to start subs
++ pomo |=([gud=gift bol=bowl] [[gud p.bol] q.bol])
++ pomp |=([tix=tape bol=bowl] (pomo la/leaf/tix bol))
2014-07-25 21:44:06 +04:00
++ posh :: pause until
|= end=@da
|= wop=$+(@da bowl)
^- bowl
:- ~ :- ~
:- ^- (list slip)
:~ [~ %wa end]
==
|= [now=@da pax=path nut=note]
(wop now)
::
2014-06-02 22:41:53 +04:00
++ merge
2014-07-25 21:44:06 +04:00
|= [gem=germ who=@p bos=@p est=time ran=rang]
|= [der=dome owr=dome des=desk]
2014-06-02 22:41:53 +04:00
^- gift
2014-07-24 19:11:40 +04:00
=+ sab=`saba`[bos des [0 let.der] der]
2014-07-24 23:21:58 +04:00
=+ lum=`(unit (unit mizu))`(~(auld ze est owr ran) gem who des sab est)
2014-06-02 22:41:53 +04:00
?~ lum
^- gift
2014-07-24 02:36:10 +04:00
:^ %la %rose [": " "" ""]
:~
leaf/"{(trip des)} failed to apply, please rerun with a merge option"
(skol -:!>(_germ))
==
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-08-01 22:11:46 +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
2014-08-01 18:54:31 +04:00
~& [%fetch des]
2014-07-24 19:11:40 +04:00
=+ der=((hard dome) .^(%cv /(scot %p bos)/[des]/[wen]))
=+ owr=((hard dome) .^(%cv /(scot %p who)/[des]/[wen]))
2014-07-25 21:44:06 +04:00
[der owr des]
2014-08-01 18:54:31 +04:00
%+ pomp "fetched new objects, merging"
%- (posh est) :: hack
2014-07-25 21:44:06 +04:00
|= tim=@da
=+ ran=((hard rang) .^(%cu /(scot %p who)/main/(scot %da tim))) :: global store
=+ gifts=`(list gift)`(turn desks (merge ?~(gem %fine -.gem) who bos est ran))
2014-06-02 22:41:53 +04:00
`bowl`[[[%la %leaf "updating..."] gifts] ~]