浏览代码

Fix grep portability (Reported-by: Andrew Thompson)

pull/3/head
Tuncer Ayaz 13 年前
父节点
当前提交
4e0ab4065f
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. +2
    -2
      priv/templates/simplenode.runner
  2. +1
    -1
      src/rebar_ct.erl

+ 2
- 2
priv/templates/simplenode.runner 查看文件

@ -23,14 +23,14 @@ cd $RUNNER_BASE_DIR
mkdir -p $RUNNER_LOG_DIR
# Extract the target node name from node.args
NAME_ARG=`egrep -e '^-s?name' $RUNNER_ETC_DIR/vm.args`
NAME_ARG=`egrep '^-s?name' $RUNNER_ETC_DIR/vm.args`
if [ -z "$NAME_ARG" ]; then
echo "vm.args needs to have either -name or -sname parameter."
exit 1
fi
# Extract the target cookie
COOKIE_ARG=`grep -e '^-setcookie' $RUNNER_ETC_DIR/vm.args`
COOKIE_ARG=`grep '^-setcookie' $RUNNER_ETC_DIR/vm.args`
if [ -z "$COOKIE_ARG" ]; then
echo "vm.args needs to have a -setcookie parameter."
exit 1

+ 1
- 1
src/rebar_ct.erl 查看文件

@ -90,7 +90,7 @@ clear_log(RawLog) ->
%% log results
check_log(RawLog) ->
{ok, Msg} =
rebar_utils:sh("grep -e 'TEST COMPLETE' -e '{error,make_failed}' "
rebar_utils:sh("egrep -e 'TEST COMPLETE' -e '{error,make_failed}' "
++ RawLog, [{use_stdout, false}]),
MakeFailed = string:str(Msg, "{error,make_failed}") =/= 0,
RunFailed = string:str(Msg, ", 0 failed") =:= 0,

正在加载...
取消
保存