urbit/pkg/arvo/gen/brass.hoon

49 lines
1.1 KiB
Plaintext
Raw Normal View History

:: Produce a brass pill
2017-06-02 01:47:24 +03:00
::
:::: /hoon/brass/gen
::
/? 310
/+ pill
2017-06-02 01:47:24 +03:00
::
::::
!:
:- %say
2020-11-19 10:44:28 +03:00
|= $: [now=@da eny=@uvJ bec=beak]
2021-09-29 16:19:24 +03:00
::
:: arg: desks to build pill from
::
:: list of desks. defaults to [%base]~.
:: the first desk in this list will become the pill's base desk.
:: optionally, the first desk may be replaced with a fully
:: qualified path to the new boot system (typically in sys).
:: the rest of the desks will be installed through kiln.
::
$= arg
$@ ~
$: base=$@(desk [@ta @ta @ta path])
rest=(list desk)
==
::
prime=_|
2017-06-02 01:47:24 +03:00
==
:- %pill
2021-07-26 08:26:49 +03:00
^- pill:pill
2017-06-02 01:47:24 +03:00
:: sys: root path to boot system, `/~me/[desk]/now/sys`
2021-09-29 16:19:24 +03:00
:: bas: root path to boot system' desk
:: dez: secondary desks and their root paths
2017-06-02 01:47:24 +03:00
::
2020-11-19 10:44:28 +03:00
=/ sys=path
2021-09-29 16:19:24 +03:00
?: ?=([^ *] arg)
`path`base.arg
=/ =desk
?~ arg %base
?>(?=(@ base.arg) base.arg)
/(scot %p p.bec)/[desk]/(scot %da now)/sys
=/ dez=(list [desk path])
?~ arg ~
%+ turn rest.arg
|= =desk
[desk /(scot %p p.bec)/[desk]/(scot %da now)]
2017-06-02 01:47:24 +03:00
::
(brass:pill sys dez prime)