about summary refs log tree commit diff stats
path: root/mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2014-12-13 00:33:20 -0800
committerKartik K. Agaram <vc@akkartik.com>2014-12-13 00:40:01 -0800
commit4f9f75ddcf0a4dd2d6db9c6d2a59eaf72b17d47d (patch)
treee2469a3c0dd64f7fcb782cf1fe62c6c6bd10876c /mu
parentbd7c17ea2106cbc0560e0b5067fc45912c38aedf (diff)
downloadmu-4f9f75ddcf0a4dd2d6db9c6d2a59eaf72b17d47d.tar.gz
405 - permit loading just low levels of codebase
When I'm doing extensive surgery to the internals I want to avoid
loading higher levels; they aren't expected to work. But I don't want to
keep different levels in separate files just for that. And I definitely
don't want to put low-level stuff first. Now I can influence loading in
a cross-cutting manner by creating sections with numbers:

  (section 100
    ...code...)

And disabling them by running:

  $ ./anarki/arc 99 mu.arc.t

Currently we load all mu 'system software' in level 100, so running at
level 99 sidesteps them. Lower levels coming soon.

But most of the time we don't need to worry about levels, and the 'mu'
script lets us forget about them. Just run .mu files with:

  $ ./mu factorial.mu

To run tests:

  $ ./mu test mu.arc.t
Diffstat (limited to 'mu')
-rwxr-xr-xmu16
1 files changed, 16 insertions, 0 deletions
diff --git a/mu b/mu
new file mode 100755
index 00000000..7833407e
--- /dev/null
+++ b/mu
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Run this from the mu directory.
+#
+# Wrapper to allow selectively running parts of the mu codebase/tests.
+#
+# Usage:
+#  mu [mu files]
+#  mu test [arc files]
+
+if [[ $1 == "test" ]]
+then
+  shift
+  ./anarki/arc load.arc "$@"  # test currently assumed to be arc files rather than mu files
+else
+  ./anarki/arc load.arc mu.arc -- "$@"  # mu files from args
+fi