我有一个名为的目录protos,其中包含单个.proto文件,但最终会包含多个文件。该目录有一个名为 的同级目录app,我想在其中转储构建的grpcpython 文件。
我正在尝试编写一个简单的 bash 脚本,该脚本将调用protoc命令并.proto在 中构建文件protos,并将构建的文件输出到app
下面是tree我放置每个文件的位置。
\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 build_protos.sh\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 trainingInstance (root module directory)\n |\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 app\n \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 app.py\n | \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 (where I\'d like my built files to go)\n | |\n | \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80trainingInstance\n | \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80protos\n | \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80(where the built files actually go)\n |\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 protos\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 TrainingService.proto (what I\'d like to compile)\n\n\nRun Code Online (Sandbox Code Playgroud)\n\n当我运行时build_protos.sh,文件TrainingService.proto被检测到正常并构建,但不是将构建的文件放入...trainingInstance/app/<file> …