Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 34 lines (25 sloc) 603 Bytes
#!/bin/sh
USAGE="Usage: `basename $0` [-o output.reb] input.re"
if [ $# -eq 0 ]; then
echo $USAGE >&2
exit 1
fi
while getopts o: OPT; do
case "$OPT" in
o) OUTPUT_FILE=$OPTARG
;;
\?) # getopts issues an error message
echo $USAGE >&2
exit 1
;;
esac
done
for PARAMS; do
INPUT_FILE=$PARAMS
done
if [ "$OUTPUT_FILE" = "" ]; then
OUTPUT_FILE=`echo $INPUT_FILE | sed s/re$/reb/`
fi
REIA_HOME=AGNER_INSTALL_PREFIX/reia
export REIA_HOME
erl -pz AGNER_INSTALL_PREFIX/reia/ebin -noshell +K true -s reia_internal compile "$INPUT_FILE" "$OUTPUT_FILE" -s erlang halt -extra $*