24 lines
901 B
Bash
Executable File
24 lines
901 B
Bash
Executable File
#!/bin/sh
|
|
if [ $# -eq 0 ]; then
|
|
echo "Usage: `basename $0` [options] [.exs file] [data]
|
|
|
|
-v Prints version and exit
|
|
-e \"command\" Evaluates the given command (*)
|
|
-f \"command\" The same as -e, but executes at the end (*)
|
|
-pa \"path\" Prepend the given path to Erlang code path (*)
|
|
-pz \"path\" Append the given path to Erlang code path (*)
|
|
--no-halt Don't halt the process after the code is executed
|
|
|
|
** Options marked with (*) can be given more than once;
|
|
|
|
** Options given after the .exs file or -- are passed down to the executed code;
|
|
|
|
** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTS." >&2
|
|
exit 1
|
|
fi
|
|
|
|
SELF=`readlink $0 || echo $0`
|
|
SCRIPT_PATH=`dirname $SELF`
|
|
ELIXIR_PATH=`cd $SCRIPT_PATH; cd ..; pwd`
|
|
erl -I $ELIXIR_PATH/include -pa $ELIXIR_PATH/ebin $ELIXIR_PATH/exbin -noshell $ELIXIR_ERL_OPTS -s elixir start -extra "$@"
|