Issue #25, fix sed(1) statement for Mac OS X

Seems that OS X sed(1) does not support the compound '{cmd;cmd}' syntax in the
same way as GNU sed(1).
This commit is contained in:
Andrew Bettison 2012-10-09 10:05:00 +10:30
parent 6954325b04
commit 7ee5266998

View File

@ -227,7 +227,7 @@ rhizome_http_server_started() {
get_rhizome_server_port() {
local _var="$1"
local _logvar=LOG${2#+}
local _port=$($SED -n -e '/.*RHIZOME HTTP SERVER.*START/{s/.*port=\([0-9]\{1,\}\).*/\1/p;q}' "${!_logvar}")
local _port=$($SED -n -e '/RHIZOME HTTP SERVER.*START/s/.*port=\([0-9]\{1,\}\).*/\1/p' "${!_logvar}" | $SED -n '$p')
assert --message="instance $2 Rhizome HTTP server port number is known" [ -n "$_port" ]
if [ -n "$_var" ]; then
eval "$_var=\$_port"