Skip to content

Commit 21be5d7

Browse files
ShafSpecsjulianoes
authored andcommitted
Updated + fixed run_protoc script
1 parent be1cb12 commit 21be5d7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

other/tools/run_protoc.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function generate {
6464
${plugin}/${plugin}.proto
6565

6666
# protoc-gen-mavsdk capitalizes filenames, and we don't want that with python
67-
mv ${GENERATED_DIR}/${plugin}/$(snake_case_to_camel_case ${plugin}).py ${GENERATED_DIR}/${plugin}.py
67+
mv -f ${GENERATED_DIR}/${plugin}/$(snake_case_to_camel_case ${plugin}).py ${GENERATED_DIR}/${plugin}.py
6868

6969
echo " -> [+] Generated plugin for ${plugin}"
7070

@@ -77,7 +77,9 @@ function generate {
7777
${plugin}.proto
7878

7979
# Again move generated file to its place.
80-
mv ${GENERATED_DIR_RST}/$(snake_case_to_camel_case ${plugin}).rst ${GENERATED_DIR_RST}/${plugin}.rst
80+
mv "${GENERATED_DIR_RST}/$(snake_case_to_camel_case ${plugin}).rst" "${GENERATED_DIR_RST}/temp.rst"
81+
mv "${GENERATED_DIR_RST}/temp.rst" "${GENERATED_DIR_RST}/${plugin}.rst"
82+
8183
echo " -> [+] Generated doc entry for ${plugin}"
8284

8385
# Add plugin entry to docs index if not already listed.

0 commit comments

Comments
 (0)