From 19f231c995b5909917dfd9194a806ae2f7378caa Mon Sep 17 00:00:00 2001 From: SisMaker <1713699517@qq.com> Date: Sun, 9 May 2021 18:08:40 +0800 Subject: [PATCH] =?UTF-8?q?ft:=20=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E4=BB=A5=E9=80=82=E9=85=8D=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/genProto.erl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/genProto.erl b/src/genProto.erl index b82523b..b7839ff 100644 --- a/src/genProto.erl +++ b/src/genProto.erl @@ -2,6 +2,10 @@ -include("genDef.hrl"). +-define(DefProtoDir, "./"). +-define(DefErlDir, "./"). +-define(DefHrlDir, "./"). + -export([main/1]). -export([ @@ -13,8 +17,14 @@ ]). main(Args) -> - [ProtoDir, HrlDir, ErlDir] = Args, - convertDir(ProtoDir, HrlDir, ErlDir). + case Args of + [] -> + convertDir(?DefProtoDir, ?DefErlDir, ?DefHrlDir); + _ -> + [ProtoDir, HrlDir, ErlDir] = Args, + convertDir(ProtoDir, HrlDir, ErlDir) + end. + convertFile(File) -> erlang:erase(),