2014-12-13 08:33:20 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2015-02-23 08:45:35 +00:00
|
|
|
# To run a program:
|
|
|
|
# $ mu [mu files]
|
|
|
|
# To run a file of tests (in arc):
|
|
|
|
# $ mu test [arc files]
|
|
|
|
# To start an interactive session:
|
|
|
|
# $ mu repl
|
2014-12-13 08:33:20 +00:00
|
|
|
#
|
2015-02-23 08:45:35 +00:00
|
|
|
# To mess with load levels and selectively run parts of the codebase, skip
|
|
|
|
# this script and call load.arc directly.
|
2014-12-13 08:33:20 +00:00
|
|
|
|
|
|
|
if [[ $1 == "test" ]]
|
|
|
|
then
|
|
|
|
shift
|
|
|
|
./anarki/arc load.arc "$@" # test currently assumed to be arc files rather than mu files
|
2015-02-23 08:45:35 +00:00
|
|
|
elif [[ $1 == "repl" ]]
|
|
|
|
then
|
|
|
|
if [ "$(type rlwrap)" ]
|
|
|
|
then
|
|
|
|
rlwrap -C mu ./anarki/arc mu.arc
|
|
|
|
else
|
|
|
|
./anarki/arc mu.arc
|
|
|
|
fi
|
2014-12-13 08:33:20 +00:00
|
|
|
else
|
|
|
|
./anarki/arc load.arc mu.arc -- "$@" # mu files from args
|
|
|
|
fi
|