kiln: add once flag to |install

It's often useful to |merge a desk, but if you're still getting updates
from your sync source, you may get overwritten in the future.  In this
case, you want to merge and clear the sync source.  With this change,
you can do this with:

```
|install ~ship %desk, =once &
```
This commit is contained in:
Philip Monk 2023-01-12 12:38:28 -07:00
parent e306d32c74
commit 3efce771d5
2 changed files with 5 additions and 3 deletions

View File

@ -8,7 +8,7 @@
:: ::
:- %say :- %say
|= $: [now=@da eny=@uvJ bec=beak] |= $: [now=@da eny=@uvJ bec=beak]
[[her=@p rem=desk ~] local=@tas] [[her=@p rem=desk ~] local=@tas once=_|]
== ==
=/ loc=desk ?:(=(%$ local) rem local) =/ loc=desk ?:(=(%$ local) rem local)
[%kiln-install loc her rem] [%kiln-install loc her rem once]

View File

@ -687,7 +687,7 @@
abet:(emit:(spam leaf+mez ~) %pass /kiln %arvo %c [%info u.tor]) abet:(emit:(spam leaf+mez ~) %pass /kiln %arvo %c [%info u.tor])
:: ::
++ poke-install ++ poke-install
|= [loc=desk her=ship rem=desk] |= [loc=desk her=ship rem=desk once=?]
=+ .^(=rock:tire %cx /(scot %p our)//(scot %da now)/tire) =+ .^(=rock:tire %cx /(scot %p our)//(scot %da now)/tire)
=/ =zest =/ =zest
?~ got=(~(get by rock) loc) ?~ got=(~(get by rock) loc)
@ -703,6 +703,8 @@
abet:(spam (render "already syncing" loc her rem ~) ~) abet:(spam (render "already syncing" loc her rem ~) ~)
?: =([our loc] [her rem]) ?: =([our loc] [her rem])
abet abet
?: once
abet:abet:(merge:(work loc) her rem da+now %only-that)
=/ sun (sync loc her rem) =/ sun (sync loc her rem)
~> %slog.(fmt "beginning install into {here:sun}") ~> %slog.(fmt "beginning install into {here:sun}")
=< abet:abet:init =< abet:abet:init