mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
531630e93a
%park is a plumbing commit task. It guarantees completion in a single event, so you have to do much of the work before calling it. -commit is an example of how to do this.
34 lines
821 B
Plaintext
34 lines
821 B
Plaintext
/- spider
|
|
/+ strandio
|
|
=, strand=strand:spider
|
|
^- thread:spider
|
|
|= arg=vase
|
|
=+ !<([scratch=desk real=desk ~] arg)
|
|
|^
|
|
=/ m (strand ,vase)
|
|
^- form:m
|
|
;< apps=(map path vase) bind:m load-apps
|
|
(pure:m !>((~(run by apps) mug)))
|
|
::
|
|
++ scratch-path
|
|
|= [=bowl:spider =path]
|
|
(weld /(scot %p our.bowl)/[scratch]/(scot %da now.bowl) path)
|
|
::
|
|
++ load-apps
|
|
=/ m (strand ,(map path vase))
|
|
^- form:m
|
|
;< =bowl:spider bind:m get-bowl:strandio
|
|
=+ .^(=arch %cy (scratch-path bowl /app))
|
|
=/ apps ~(tap in ~(key by dir.arch))
|
|
=/ rails
|
|
%- malt
|
|
%+ murn apps
|
|
|= =term
|
|
^- (unit [^term rail:ford])
|
|
=+ .^(=app=^arch %cy (scratch-path bowl /app/[term]))
|
|
?. (~(has by dir.app-arch) %hoon)
|
|
~
|
|
`[/[term] our.bowl^scratch /hoon/[term]/app]
|
|
(build-cores:strandio rails)
|
|
--
|