Fix some low hanging differences when running make style on Windows vs Linux

This commit is contained in:
nvx 2024-01-26 20:08:36 +10:00
parent 41d545f5b8
commit b4ae4c429f
3 changed files with 6 additions and 4 deletions

View file

@ -323,14 +323,14 @@ style:
--style=google --pad-oper --unpad-paren --pad-header \
--align-pointer=name {} \;
# Update commands.md
[ -x client/proxmark3 ] && client/proxmark3 -m > doc/commands.md
[ -x client/proxmark3 ] && client/proxmark3 -m | tr -d '\r' > doc/commands.md
# Make sure python3 is installed
@command -v python3 >/dev/null || ( echo "Please install 'python3' package first" ; exit 1 )
# Update commands.json, patch port in case it was run under Windows
[ -x client/proxmark3 ] && client/proxmark3 --fulltext | sed 's#com[0-9]#/dev/ttyACM0#'|python3 client/pyscripts/pm3_help2json.py - doc/commands.json
[ -x client/proxmark3 ] && client/proxmark3 --fulltext | sed 's#com[0-9]#/dev/ttyACM0#'|python3 client/pyscripts/pm3_help2json.py - - | tr -d '\r' > doc/commands.json
# Update the readline autocomplete autogenerated code
[ -x client/proxmark3 ] && client/proxmark3 --fulltext | python3 client/pyscripts/pm3_help2list.py - client/src/pm3line_vocabulary.h
[ -x client/proxmark3 ] && client/proxmark3 --fulltext | python3 client/pyscripts/pm3_help2list.py - - | tr -d '\r' > client/src/pm3line_vocabulary.h
# Detecting weird codepages and tabs.

View file

@ -47,6 +47,7 @@ def main():
'commands': command_data,
}
json.dump(output_data, args.output_file, indent=4, sort_keys=True)
args.output_file.write("\n") # add trailing newline as json.dump does not
logging.info(f'{get_version()} completed!')

View file

@ -96,7 +96,8 @@ const static vocabulary_t vocabulary[] = {\n""")
}
#endif
#endif""")
#endif
""")
logging.info(f'{get_version()} completed!')