2018-12-04 21:41:04 +03:00
|
|
|
:: |pill: helper functions for making pills
|
|
|
|
::
|
2018-12-12 00:27:33 +03:00
|
|
|
^?
|
2018-12-04 21:41:04 +03:00
|
|
|
|%
|
|
|
|
::
|
2019-08-06 03:44:52 +03:00
|
|
|
+$ pill
|
2020-12-07 05:35:24 +03:00
|
|
|
$% [%ivory p=(list)]
|
2021-07-26 08:26:49 +03:00
|
|
|
$: %pill
|
|
|
|
nam=term
|
|
|
|
boot-ova=(list)
|
|
|
|
kernel-ova=(list unix-event)
|
|
|
|
userspace-ova=(list unix-event)
|
|
|
|
==
|
2021-06-17 07:33:11 +03:00
|
|
|
==
|
2019-08-06 03:44:52 +03:00
|
|
|
::
|
|
|
|
+$ unix-event
|
|
|
|
%+ pair wire
|
|
|
|
$% [%wack p=@]
|
2020-11-19 10:44:28 +03:00
|
|
|
[%what p=(list (pair path (cask)))]
|
2019-08-06 03:44:52 +03:00
|
|
|
[%whom p=ship]
|
2020-12-08 03:47:06 +03:00
|
|
|
[%boot ? $%($>(%fake task:jael) $>(%dawn task:jael))]
|
2021-06-17 09:49:56 +03:00
|
|
|
[%wyrd p=vere]
|
|
|
|
[%verb p=(unit ?)]
|
2019-08-06 03:44:52 +03:00
|
|
|
unix-task
|
|
|
|
==
|
2020-12-07 05:35:24 +03:00
|
|
|
:: +boot-ovum: boostrap kernel filesystem load
|
|
|
|
::
|
|
|
|
++ boot-ovum
|
|
|
|
|= [hoon=cord arvo=cord]
|
|
|
|
:~ //arvo
|
|
|
|
%what
|
|
|
|
[/sys/hoon hoon/hoon]
|
|
|
|
[/sys/arvo hoon/arvo]
|
|
|
|
==
|
2018-12-04 21:41:04 +03:00
|
|
|
:: +file-ovum: userspace filesystem load
|
|
|
|
::
|
2020-05-09 15:09:26 +03:00
|
|
|
:: bas: full path to / directory
|
2018-12-04 21:41:04 +03:00
|
|
|
::
|
|
|
|
++ file-ovum
|
2020-05-09 15:09:26 +03:00
|
|
|
=/ directories=(list path)
|
|
|
|
:~ /app :: %gall applications
|
|
|
|
/gen :: :dojo generators
|
|
|
|
/lib :: libraries
|
|
|
|
/mar :: mark definitions
|
|
|
|
/sur :: structures
|
|
|
|
/sys :: system files
|
|
|
|
/ted :: :spider strands
|
|
|
|
/tests :: unit tests
|
|
|
|
/web :: %eyre web content
|
|
|
|
==
|
2018-12-04 21:41:04 +03:00
|
|
|
|= bas=path
|
2019-08-07 23:37:57 +03:00
|
|
|
^- unix-event
|
2019-05-23 00:39:12 +03:00
|
|
|
%. directories
|
2018-12-04 21:41:04 +03:00
|
|
|
|= :: sal: all spurs to load from
|
|
|
|
::
|
2020-11-25 23:22:55 +03:00
|
|
|
sal=(list spur)
|
2019-08-07 23:37:57 +03:00
|
|
|
^- unix-event
|
2018-12-04 21:41:04 +03:00
|
|
|
::
|
|
|
|
:: hav: all user files
|
|
|
|
::
|
|
|
|
=; hav ~& user-files+(lent hav)
|
2020-11-16 22:53:21 +03:00
|
|
|
[/c/sync [%into %$ & hav]]
|
2020-11-25 23:22:55 +03:00
|
|
|
=| hav=mode:clay
|
2018-12-04 21:41:04 +03:00
|
|
|
|- ^+ hav
|
|
|
|
?~ sal ~
|
|
|
|
=. hav $(sal t.sal)
|
|
|
|
::
|
|
|
|
:: tyl: spur
|
|
|
|
::
|
|
|
|
=/ tyl i.sal
|
|
|
|
|- ^+ hav
|
|
|
|
::
|
|
|
|
:: pax: full path at `tyl`
|
|
|
|
:: lon: directory at `tyl`
|
|
|
|
::
|
|
|
|
=/ pax (weld bas (flop tyl))
|
|
|
|
=/ lon .^(arch %cy pax)
|
|
|
|
:: XX this serialization should use marks
|
|
|
|
::
|
|
|
|
=? hav ?=(^ fil.lon)
|
2019-06-28 03:49:56 +03:00
|
|
|
:: XX this whitelist needs to be reviewed
|
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
?. ?= ?(%css %hoon %html %js %json %md %png %txt %udon %umd)
|
2018-12-04 21:41:04 +03:00
|
|
|
-.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
|
2020-11-26 17:09:31 +03:00
|
|
|
[%json *]
|
2018-12-04 21:41:04 +03:00
|
|
|
=/ dat .^(json %cx pax)
|
|
|
|
(as-octt:mimes:html (en-json:html dat))
|
|
|
|
::
|
2020-12-08 10:03:09 +03:00
|
|
|
[?(%md %txt) *]
|
2018-12-04 21:41:04 +03:00
|
|
|
=/ dat .^(wain %cx pax)
|
|
|
|
(as-octs:mimes:html (of-wain:format dat))
|
|
|
|
::
|
|
|
|
*
|
|
|
|
=/ dat .^(@t %cx pax)
|
|
|
|
[(met 3 dat) dat]
|
|
|
|
==
|
|
|
|
=/ all ~(tap by dir.lon)
|
|
|
|
|- ^- mode:clay
|
|
|
|
?~ all hav
|
|
|
|
$(all t.all, hav ^$(tyl [p.i.all tyl]))
|
2020-11-19 10:44:28 +03:00
|
|
|
::
|
|
|
|
:: +file-ovum2: electric boogaloo
|
|
|
|
::
|
|
|
|
++ file-ovum2 |=(p=path `unix-event`[//arvo what/(user-files p)])
|
|
|
|
::
|
|
|
|
:: +user-files: all userspace hoon files
|
|
|
|
::
|
|
|
|
++ user-files
|
|
|
|
|= bas=path
|
|
|
|
%. directories:file-ovum
|
|
|
|
|= sal=(list spur)
|
|
|
|
^- (list (pair path (cask)))
|
|
|
|
::
|
|
|
|
:: hav: all user files
|
|
|
|
::
|
|
|
|
=| hav=(list (pair path (cask)))
|
|
|
|
|- ^+ hav
|
|
|
|
?~ sal ~
|
|
|
|
=. hav $(sal t.sal)
|
|
|
|
::
|
|
|
|
:: tyl: spur
|
|
|
|
::
|
|
|
|
=/ tyl i.sal
|
|
|
|
|- ^+ hav
|
|
|
|
::
|
|
|
|
:: pax: full path at `tyl`
|
|
|
|
:: lon: directory at `tyl`
|
|
|
|
::
|
|
|
|
=/ pax (weld bas (flop tyl))
|
|
|
|
=/ lon .^(arch %cy pax)
|
|
|
|
=? hav ?=(^ fil.lon)
|
|
|
|
::
|
|
|
|
:: install only hoon files for now
|
|
|
|
::
|
|
|
|
?. ?=([%hoon *] tyl)
|
|
|
|
hav
|
|
|
|
:_ hav
|
|
|
|
[(flop `path`t.tyl) hoon/.^(@t %cx pax)]
|
|
|
|
::
|
|
|
|
=/ all ~(tap by dir.lon)
|
|
|
|
|- ^+ hav
|
|
|
|
?~ all hav
|
|
|
|
$(all t.all, hav ^$(tyl [p.i.all tyl]))
|
2018-12-04 21:41:04 +03:00
|
|
|
--
|