| 23 | |
| 24 | |
| 25 | def main(): |
| 26 | if len(sys.argv) != 3: |
| 27 | print("Must specify input and output file paths") |
| 28 | sys.exit(1) |
| 29 | |
| 30 | input_file = Path(sys.argv[1]) |
| 31 | output_file = Path(sys.argv[2]) |
| 32 | |
| 33 | # Assumes `strip` tool is in the path (should be specified by Skycastle workflow). |
| 34 | # GNU `strip`, or equivalent, should work for x86 and ARM ELF binaries. This might |
| 35 | # not be appropriate for more exotic, non-ELF toolchains. |
| 36 | completed = subprocess.run(["strip", "--strip-all", input_file, "-o", output_file]) |
| 37 | sys.exit(completed.returncode) |
| 38 | |
| 39 | |
| 40 | if __name__ == "__main__": |