2021-10-25 17:20:34 +03:00
|
|
|
:: |new-desk: creates a minimal desk
|
|
|
|
::
|
2022-06-01 21:21:27 +03:00
|
|
|
/+ *generators
|
|
|
|
::
|
|
|
|
:- %ask
|
2021-10-25 17:20:34 +03:00
|
|
|
|= $: [now=@da eny=@uvJ bek=beak]
|
|
|
|
[=desk ~]
|
2023-03-28 05:58:19 +03:00
|
|
|
[from=$~(%base desk) hard=_| minimal=_|]
|
2021-10-25 17:20:34 +03:00
|
|
|
==
|
|
|
|
::
|
2022-06-01 21:21:27 +03:00
|
|
|
=; make-new-desk
|
|
|
|
?. ?& !hard
|
|
|
|
(~(has in .^((set ^desk) %cd (en-beam bek(q %$) /))) desk)
|
|
|
|
==
|
|
|
|
(make-new-desk)
|
|
|
|
%+ print (rap 3 'the desk %' desk ' already exists. overwrite it?' ~)
|
|
|
|
%+ prompt [%& %prompt "overwrite? (y/N) "]
|
|
|
|
|= in=tape
|
|
|
|
?. |(=("y" in) =("Y" in) =("yes" in))
|
|
|
|
no-product
|
|
|
|
(make-new-desk)
|
2021-10-25 17:20:34 +03:00
|
|
|
::
|
2022-06-01 21:21:27 +03:00
|
|
|
|. %- produce
|
2021-10-25 17:20:34 +03:00
|
|
|
:- %helm-pass
|
|
|
|
%^ new-desk:cloy desk
|
|
|
|
~
|
|
|
|
%- ~(gas by *(map path page:clay))
|
|
|
|
|^ =- (turn - mage)
|
|
|
|
^- (list path)
|
2023-03-28 05:58:19 +03:00
|
|
|
=/ common-files=(list path) :~
|
|
|
|
/mar/noun/hoon
|
2021-10-25 17:20:34 +03:00
|
|
|
/mar/hoon/hoon
|
2022-01-04 17:58:37 +03:00
|
|
|
/mar/txt/hoon
|
2021-10-25 17:20:34 +03:00
|
|
|
/mar/kelvin/hoon
|
|
|
|
/sys/kelvin
|
2023-03-28 05:58:19 +03:00
|
|
|
==
|
|
|
|
=/ extra-files=(list path) ?: minimal [~]
|
|
|
|
:~
|
|
|
|
/mar/bill/hoon
|
|
|
|
/mar/mime/hoon
|
|
|
|
/mar/json/hoon
|
|
|
|
/lib/skeleton/hoon
|
|
|
|
/lib/default-agent/hoon
|
|
|
|
/lib/dbug/hoon
|
|
|
|
==
|
|
|
|
(weld common-files extra-files)
|
2021-10-25 17:20:34 +03:00
|
|
|
::
|
|
|
|
++ mage
|
|
|
|
|= =path
|
|
|
|
:- path
|
|
|
|
^- page:clay
|
2022-06-01 21:20:18 +03:00
|
|
|
:- (rear path)
|
2021-10-25 17:20:34 +03:00
|
|
|
~| [%missing-source-file from path]
|
2022-06-01 21:20:18 +03:00
|
|
|
.^ *
|
|
|
|
%cx
|
|
|
|
(scot %p p.bek)
|
|
|
|
from
|
|
|
|
(scot %da now)
|
|
|
|
path
|
|
|
|
==
|
2021-10-25 17:20:34 +03:00
|
|
|
--
|