diff --git a/Makefile b/Makefile index c86e765a6..29f0a3f60 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/client/pyscripts/pm3_help2json.py b/client/pyscripts/pm3_help2json.py index 34faedec5..b7612d7cc 100755 --- a/client/pyscripts/pm3_help2json.py +++ b/client/pyscripts/pm3_help2json.py @@ -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!') diff --git a/client/pyscripts/pm3_help2list.py b/client/pyscripts/pm3_help2list.py index a896e5546..2798782bb 100755 --- a/client/pyscripts/pm3_help2list.py +++ b/client/pyscripts/pm3_help2list.py @@ -96,7 +96,8 @@ const static vocabulary_t vocabulary[] = {\n""") } #endif -#endif""") +#endif +""") logging.info(f'{get_version()} completed!')