From 4f41e742d3e583741d2e9cbacdd43f8ca5d90767 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 5 Aug 2011 02:55:47 +0200 Subject: [PATCH] rebar_eunit_tests: avoid repetition --- test/rebar_eunit_tests.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/rebar_eunit_tests.erl b/test/rebar_eunit_tests.erl index d1bfd82..2b9c44e 100644 --- a/test/rebar_eunit_tests.erl +++ b/test/rebar_eunit_tests.erl @@ -208,10 +208,11 @@ remove_tmp_dir(_) -> %% ==================================================================== prepare_rebar_script() -> - {ok, _} = file:copy(?REBAR_SCRIPT, ?TMP_DIR ++ "rebar"), + Rebar = ?TMP_DIR ++ "rebar", + {ok, _} = file:copy(?REBAR_SCRIPT, Rebar), case os:type() of {unix, _} -> - [] = os:cmd("chmod u+x " ++ ?TMP_DIR ++ "rebar"); + [] = os:cmd("chmod u+x " ++ Rebar); {win32, _} -> {ok, _} = file:copy(?REBAR_SCRIPT ++ ".bat", ?TMP_DIR ++ "rebar.bat")