mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 18:48:14 +03:00
gen: add |new-desk for creating minimal desks
Includes the bare minimum of necessary files.
This commit is contained in:
parent
f53a43c2f0
commit
71c7d315a9
35
pkg/arvo/gen/hood/new-desk.hoon
Normal file
35
pkg/arvo/gen/hood/new-desk.hoon
Normal file
@ -0,0 +1,35 @@
|
||||
:: |new-desk: creates a minimal desk
|
||||
::
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bek=beak]
|
||||
[=desk ~]
|
||||
from=$~(%base desk)
|
||||
==
|
||||
::
|
||||
?: (~(has in .^((set ^desk) %cd (en-beam bek(q from) /))) desk)
|
||||
~| [%already-exists desk]
|
||||
!!
|
||||
::
|
||||
=+ .^(=dome:clay %cv (en-beam bek /))
|
||||
::
|
||||
:- %helm-pass
|
||||
%^ new-desk:cloy desk
|
||||
~
|
||||
%- ~(gas by *(map path page:clay))
|
||||
|^ =- (turn - mage)
|
||||
^- (list path)
|
||||
:~ /mar/noun/hoon
|
||||
/mar/hoon/hoon
|
||||
/mar/kelvin/hoon
|
||||
/sys/kelvin
|
||||
==
|
||||
::
|
||||
++ mage
|
||||
|= =path
|
||||
:- path
|
||||
^- page:clay
|
||||
=; =cage [p q.q]:cage
|
||||
~| [%missing-source-file from path]
|
||||
(need (~(get an:cloy ank.dome) path))
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user