Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 30 lines (26 sloc) 1.047 kb
f88abd9 Environment (and other) configuration has been reworked; Erjang now u…
Erik Søe Sørensen authored
1 # Read and/or guess Erjang settings
2 PROP_FILE="$ERJANG_DIR/erjang_cfg.properties"
3 if [ -r "$PROP_FILE" ] ; then
4 shopt -s extglob # Used for trimming
5 # Parse properties file:
6 while s=""; read s || [ -n "$s" ] ; do
7 if [[ "$s" == "#"* ]] ; then continue; fi # Comment line
8 if [[ "$s" != *"="* ]] ; then continue; fi # No '='
9 propname=${s%%=*} ; propname=${propname%%*([[:space:]])}
10 propvalue=${s#*=} ; propvalue=${propvalue##*([[:space:]])}
075603f @goj Shell script cleanup
goj authored
11
f88abd9 Environment (and other) configuration has been reworked; Erjang now u…
Erik Søe Sørensen authored
12 # Set variable if it has the right prefix:
13 if [[ "$propname" == "erjang."* ]] ; then
14 varname=${propname//./_}
15 declare "$varname"="$propvalue"
16 fi
17 done < "$PROP_FILE"
075603f @goj Shell script cleanup
goj authored
18 fi
19
f88abd9 Environment (and other) configuration has been reworked; Erjang now u…
Erik Søe Sørensen authored
20 ## For listing parsed property names:
21 # echo "${!erjang*}"
075603f @goj Shell script cleanup
goj authored
22
f88abd9 Environment (and other) configuration has been reworked; Erjang now u…
Erik Søe Sørensen authored
23 ERL_ROOT=${erjang_otp_root:-/usr/lib/erlang}
24 if [ -r "$ERL_ROOT/releases/start_erl.data" ] ; then
25 ERTS_VSN_GUESS=$(awk '{print $1}' "$ERL_ROOT/releases/start_erl.data")
26 OTP_VSN_GUESS=$(awk '{print $2}' "$ERL_ROOT/releases/start_erl.data")
075603f @goj Shell script cleanup
goj authored
27 fi
f88abd9 Environment (and other) configuration has been reworked; Erjang now u…
Erik Søe Sørensen authored
28 ERTS_VSN=${erjang_erts_version:-$ERTS_VSN_GUESS}
29 OTP_VSN=${erjang_otp_version:-$OTP_VSN_GUESS}
Something went wrong with that request. Please try again.