forked from elixir-lang/elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
elixirc
executable file
·33 lines (27 loc) · 970 Bytes
/
elixirc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
if [ $# -eq 0 ]; then
echo "Usage: `basename $0` [switches] [.ex files]
-v Prints version and exit
-o The directory to output compiled files
-pa \"path\" Prepend the given path to Erlang code path (*)
-pz \"path\" Append the given path to Erlang code path (*)
--no-docs Do not attach documentation with compiled code
--debug-info Attach debug info to compiled modules
--ignore-module-conflict
** Options marked with (*) can be given more than once;
** Options given after -- are passed down to the executed code;
** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTS." >&2
exit 1
fi
readlink_f () {
cd "$(dirname "$1")" > /dev/null
local filename="$(basename "$1")"
if [ -h "$filename" ]; then
readlink_f "$(readlink "$filename")"
else
echo "`pwd -P`/$filename"
fi
}
SELF=$(readlink_f "$0")
SCRIPT_PATH=$(dirname "$SELF")
"$SCRIPT_PATH"/elixir +compile "$@"