ソースを参照

Use file:change_mode/2 instead of invoking chmod

pull/3/head
Juhani Rankimies 14年前
committed by Tuncer Ayaz
コミット
9441251f9f
1個のファイルの変更3行の追加1行の削除
  1. +3
    -1
      src/rebar_escripter.erl

+ 3
- 1
src/rebar_escripter.erl ファイルの表示

@ -30,6 +30,7 @@
clean/2]). clean/2]).
-include("rebar.hrl"). -include("rebar.hrl").
-include_lib("kernel/include/file.hrl").
%% =================================================================== %% ===================================================================
%% Public API %% Public API
@ -70,7 +71,8 @@ escriptize(Config, AppFile) ->
end, end,
%% Finally, update executable perms for our script %% Finally, update executable perms for our script
[] = os:cmd(?FMT("chmod u+x ~p", [Filename])),
{ok, #file_info{mode = Mode}} = file:read_file_info(Filename),
ok = file:change_mode(Filename, Mode bor 8#00100),
ok. ok.
clean(Config, AppFile) -> clean(Config, AppFile) ->

読み込み中…
キャンセル
保存