kiln: install from existing desks during +on-init

During kiln's +on-init, we now check for non-base (and non-kids) desks.
If any are present, we execute the install flow for them, and set them
to sync from our sponsor afterwards.

This depends on work done in d7afe3229, in that without those changes
the successive +find requests from kiln to clay would clobber each
other, leaving only the "install from sponsor" one active, thus never
actually installing the desk for which we already have the files.
This commit is contained in:
Fang 2021-09-15 23:46:56 +02:00
parent d7afe32291
commit 22ad2516c9
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972

View File

@ -212,11 +212,30 @@
++ on-init
=< abet
~> %slog.0^leaf/"kiln: boot"
=/ =rein [liv=& add=(sy %hood %dojo ~) sub=~] :: TODO questionable
=/ daz (get-apps-want base-bill rein)
%- emil
%- zing ^- (list (list card:agent:gall))
(turn daz start-dude:~(pass vats [%base *arak]))
=/ desks=(set desk)
.^((set desk) %cd /(scot %p our)//(scot %da now))
=. desks (~(del in desks) %base)
=. desks (~(del in desks) %kids)
:: set up base desk
::
=. ..on-init
=/ =rein [liv=& add=(sy %hood %dojo ~) sub=~] :: TODO questionable
=/ daz (get-apps-want base-bill rein)
%- emil
%- zing ^- (list (list card:agent:gall))
(turn daz start-dude:~(pass vats [%base *arak]))
:: install other desks
::
=/ dez=(list desk) ~(tap in desks)
=/ sop=ship
(sein:title our now our)
|-
?~ dez ..on-init
=. ..on-init
abet:(install:vats i.dez our i.dez)
=? ..on-init !=(sop our)
abet:(install:vats i.dez sop i.dez)
$(dez t.dez)
::
++ on-load
=> |%