mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 04:58:08 +03:00
various: can bootstrap off existing ship, but generators are broken
This commit is contained in:
parent
99fc7ea5d5
commit
a1b82d4b36
@ -16,7 +16,7 @@
|
||||
[%10 drum=state-2:drum helm=state:helm kiln=state-0:kiln]
|
||||
[%11 drum=state-2:drum helm=state:helm kiln=state-0:kiln]
|
||||
[%12 drum=state-2:drum helm=state:helm kiln=state-0:kiln]
|
||||
[%13 drum=state-2:drum helm=state:helm kiln=state-0:kiln]
|
||||
[%13 drum=state-2:drum helm=state:helm kiln=state-1:kiln]
|
||||
[%14 drum=state-3:drum helm=state:helm kiln=state-1:kiln]
|
||||
[%15 drum=state-3:drum helm=state:helm kiln=state-2:kiln]
|
||||
[%16 drum=state-4:drum helm=state:helm kiln=state-3:kiln]
|
||||
|
@ -4,7 +4,6 @@
|
||||
%dbug
|
||||
%dojo
|
||||
%eth-watcher
|
||||
%goad
|
||||
%lens
|
||||
%ping
|
||||
%spider
|
||||
|
@ -126,12 +126,12 @@
|
||||
::
|
||||
++ on-init
|
||||
=< abet
|
||||
~> %slog.0^leaf/"kiln: init"
|
||||
~> %slog.0^leaf/"kiln: boot"
|
||||
%- emil
|
||||
%+ turn (get-apps-want %base *rein)
|
||||
|= =dude:gall
|
||||
~> %slog.0^leaf/"kiln: %jolt {<dude>}"
|
||||
[%pass /kiln/jolt/[dude] %arvo %g %jolt %base dude]
|
||||
[%pass /kiln/vats/base/jolt/[dude] %arvo %g %jolt %base dude]
|
||||
::
|
||||
++ on-load
|
||||
|= [hood-version=@ud old=any-state]
|
||||
@ -203,8 +203,9 @@
|
||||
++ make-wire |=(step=@tas /kiln/vats/[loc]/[step])
|
||||
++ from-wire
|
||||
|= =wire
|
||||
?> ?=([%kiln %vats @ @ ~] wire)
|
||||
(abed i.t.t.wire)
|
||||
~| wire
|
||||
?> ?=([@ @ *] wire)
|
||||
(abed i.wire)
|
||||
::
|
||||
++ emit |=(card:agent:gall vats(kiln (^emit +<)))
|
||||
++ emil |=((list card:agent:gall) vats(kiln (^emil +<)))
|
||||
@ -238,7 +239,7 @@
|
||||
%- emil
|
||||
%+ turn (get-apps-have lac)
|
||||
|= =dude:gall
|
||||
[%pass /kiln/vats/uninstall %arvo %g %idle dude]
|
||||
[%pass /kiln/vats/[lac]/uninstall %arvo %g %idle dude]
|
||||
::
|
||||
kiln(ark (~(del by ark) lac))
|
||||
:: +install: set up desk sync to .lac to install all apps from [her rem]
|
||||
@ -285,17 +286,18 @@
|
||||
++ take
|
||||
|= [=wire syn=sign-arvo]
|
||||
^+ vats
|
||||
?> ?=([@ @ *] wire)
|
||||
?: ?=(%jolt i.t.wire)
|
||||
(take-onto wire syn)
|
||||
=. vats (from-wire wire)
|
||||
?> ?=([%kiln %vats @ @ ~] wire)
|
||||
?+ i.t.t.t.wire
|
||||
~> %slog.0^leaf/"kiln: vats-bad-take {<t.t.t.wire>}"
|
||||
?+ i.t.wire
|
||||
~> %slog.0^leaf/"kiln: vats-bad-take {<wire>}"
|
||||
vats
|
||||
%find (take-find syn)
|
||||
%sync (take-sync syn)
|
||||
%download (take-download syn)
|
||||
%merge-main (take-merge-main syn)
|
||||
%merge-kids (take-merge-kids syn)
|
||||
%jolt (take-onto syn)
|
||||
==
|
||||
::
|
||||
++ take-find
|
||||
@ -375,7 +377,7 @@
|
||||
%- emil
|
||||
%+ turn (get-apps-want loc rein.rak)
|
||||
|= =dude:gall
|
||||
[%pass /kiln/jolt/[dude] %arvo %g %jolt loc dude]
|
||||
[%pass /kiln/vats/[loc]/jolt/[dude] %arvo %g %jolt loc dude]
|
||||
?. =(%base loc)
|
||||
vats
|
||||
=. kiln (bump (sy %base %kids ~))
|
||||
@ -401,11 +403,16 @@
|
||||
(emit %give %fact [/vats]~ %kiln-vats-diff !>(fact))
|
||||
::
|
||||
++ take-onto
|
||||
|= syn=sign-arvo
|
||||
|= [=wire syn=sign-arvo]
|
||||
^+ vats
|
||||
=/ onto ?>(?=([%gall %onto *] syn) p.syn)
|
||||
?- -.onto
|
||||
%& vats
|
||||
%& ?> ?=([@ @ ~] wire)
|
||||
=+ ;;([=desk =dude:gall] [i i.t]:wire)
|
||||
?. (is-fish dude desk)
|
||||
vats
|
||||
=/ =cage [%drum-link !>([our dude])]
|
||||
(emit %pass /kiln/link %agent [our %hood] %poke cage)
|
||||
%| (mean p.onto) :: TODO: kill arvo event on failure
|
||||
==
|
||||
--
|
||||
@ -423,13 +430,19 @@
|
||||
^- (list dude:gall)
|
||||
%~ tap in
|
||||
.^((set dude:gall) ge+/(scot %p our)/[desk]/(scot %da now))
|
||||
:: +is-fish: should dill link .dude?
|
||||
::
|
||||
++ is-fish
|
||||
|= [=dude:gall =desk]
|
||||
^- ?
|
||||
=+ .^(=bill cx+/(scot %p our)/[desk]/(scot %da now)/desk/bill)
|
||||
.?((find ~[dude] (read-fish bill)))
|
||||
:: +get-apps-want: find which apps should be running on a desk
|
||||
::
|
||||
++ get-apps-want
|
||||
|= [=desk =rein]
|
||||
^- (list dude:gall)
|
||||
=+ .^(=bill cx+/(scot %p our)/[desk]/(scot %da now)/desk/bill)
|
||||
~> %slog.0^leaf/"kiln: bill {<bill>}"
|
||||
=/ duz (read-apes bill)
|
||||
=. duz (skip duz ~(has in sub.rein))
|
||||
=. duz (weld duz ~(tap in add.rein))
|
||||
|
@ -47,7 +47,7 @@
|
||||
/ted :: :spider strands
|
||||
/tests :: unit tests
|
||||
/web :: %eyre web content
|
||||
/desk
|
||||
/desk :: desk manifest
|
||||
==
|
||||
|= bas=path
|
||||
^- unix-event
|
||||
@ -60,8 +60,12 @@
|
||||
:: hav: all user files
|
||||
::
|
||||
=; hav ~& user-files+(lent hav)
|
||||
[/c/sync [%into %$ & hav]]
|
||||
=| hav=mode:clay
|
||||
=/ =yuki:clay
|
||||
:- *(list tako:clay)
|
||||
%- ~(gas by *(map path (each page:clay lobe:clay)))
|
||||
(turn hav |=([=path =page:clay] [path &+page]))
|
||||
[/c/sync [%park %base &+yuki *rang:clay]]
|
||||
=| hav=(list [path page:clay])
|
||||
|- ^+ hav
|
||||
?~ sal ~
|
||||
=. hav $(sal t.sal)
|
||||
@ -74,55 +78,13 @@
|
||||
:: pax: full path at `tyl`
|
||||
:: lon: directory at `tyl`
|
||||
::
|
||||
=/ pax (weld bas (flop tyl))
|
||||
=/ lyt (flop tyl)
|
||||
=/ pax (weld bas lyt)
|
||||
=/ lon .^(arch %cy pax)
|
||||
:: XX this serialization should use marks
|
||||
::
|
||||
=? hav ?=(^ fil.lon)
|
||||
:: XX this whitelist needs to be reviewed
|
||||
::
|
||||
?. ?= $? %css %hoon %html %js %json %md %png %txt
|
||||
%udon %umd %kelvin %bill %woff2
|
||||
==
|
||||
-.tyl
|
||||
::
|
||||
:: install only files with whitelisted marks
|
||||
::
|
||||
~& ignoring+pax
|
||||
hav
|
||||
::
|
||||
:: cot: file as plain-text octet-stream
|
||||
::
|
||||
=; cot [[(flop `path`tyl) `[/text/plain cot]] hav]
|
||||
^- octs
|
||||
?- tyl
|
||||
[%json *]
|
||||
=/ dat .^(json %cx pax)
|
||||
(as-octt:mimes:html (en-json:html dat))
|
||||
::
|
||||
[?(%md %txt) *]
|
||||
=/ dat .^(wain %cx pax)
|
||||
(as-octs:mimes:html (of-wain:format dat))
|
||||
::
|
||||
[%kelvin *]
|
||||
=/ weft ,[lal=@tas num=@ud] :: TODO remove after merge
|
||||
=/ dat .^(weft %cx pax)
|
||||
q:(weft-to-mime dat)
|
||||
::
|
||||
[%bill *]
|
||||
=/ dat .^(bill %cx pax)
|
||||
q:(bill-to-mime dat)
|
||||
::
|
||||
[%woff2 *]
|
||||
=/ dat .^(octs %cx pax)
|
||||
dat
|
||||
::
|
||||
*
|
||||
=/ dat .^(@t %cx pax)
|
||||
[(met 3 dat) dat]
|
||||
==
|
||||
:_(hav [lyt mark=;;(@tas (head tyl)) noun=.^(* %cx pax)])
|
||||
=/ all ~(tap by dir.lon)
|
||||
|- ^- mode:clay
|
||||
|- ^+ hav
|
||||
?~ all hav
|
||||
$(all t.all, hav ^$(tyl [p.i.all tyl]))
|
||||
::
|
||||
|
@ -2168,6 +2168,11 @@
|
||||
:: %clay: external edit
|
||||
::
|
||||
$>(%into task:clay)
|
||||
:: %clay: synchronous commit
|
||||
::
|
||||
:: TODO: make $yuki an option for %into?
|
||||
::
|
||||
$>(%park task:clay)
|
||||
:: %eyre: learn ports of live http servers
|
||||
::
|
||||
$>(%live task:eyre)
|
||||
|
@ -1658,6 +1658,7 @@
|
||||
|= [=ford-cache deletes=(set path) changes=(set path)]
|
||||
^+ ford-cache
|
||||
?: (~(has in changes) /sys/kelvin)
|
||||
~> %slog.0^'clay: desk kelvin changed, clearing ford cache'
|
||||
*^ford-cache
|
||||
=/ invalid=(set path) (~(uni in deletes) changes)
|
||||
=. invalid
|
||||
|
@ -54,7 +54,6 @@
|
||||
$: %g ::
|
||||
$> $? %jolt ::
|
||||
%deal ::
|
||||
%goad ::
|
||||
== ::
|
||||
task:gall ::
|
||||
== ::
|
||||
|
Loading…
Reference in New Issue
Block a user