Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (26 sloc) 1.047 kB
# Read and/or guess Erjang settings
PROP_FILE="$ERJANG_DIR/erjang_cfg.properties"
if [ -r "$PROP_FILE" ] ; then
shopt -s extglob # Used for trimming
# Parse properties file:
while s=""; read s || [ -n "$s" ] ; do
if [[ "$s" == "#"* ]] ; then continue; fi # Comment line
if [[ "$s" != *"="* ]] ; then continue; fi # No '='
propname=${s%%=*} ; propname=${propname%%*([[:space:]])}
propvalue=${s#*=} ; propvalue=${propvalue##*([[:space:]])}
# Set variable if it has the right prefix:
if [[ "$propname" == "erjang."* ]] ; then
varname=${propname//./_}
declare "$varname"="$propvalue"
fi
done < "$PROP_FILE"
fi
## For listing parsed property names:
# echo "${!erjang*}"
ERL_ROOT=${erjang_otp_root:-/usr/lib/erlang}
if [ -r "$ERL_ROOT/releases/start_erl.data" ] ; then
ERTS_VSN_GUESS=$(awk '{print $1}' "$ERL_ROOT/releases/start_erl.data")
OTP_VSN_GUESS=$(awk '{print $2}' "$ERL_ROOT/releases/start_erl.data")
fi
ERTS_VSN=${erjang_erts_version:-$ERTS_VSN_GUESS}
OTP_VSN=${erjang_otp_version:-$OTP_VSN_GUESS}
Jump to Line
Something went wrong with that request. Please try again.