diff --git a/EXAMPLE_USAGE.md b/EXAMPLE_USAGE.md index 6976b9d..6346112 100644 --- a/EXAMPLE_USAGE.md +++ b/EXAMPLE_USAGE.md @@ -1,7 +1,8 @@ ## Example usage ```text -$ echo 't&((t>>7)-t)&t>>8' | python ./bytebeat_compiler.py - -p 44100 -v && ./build/render_bytebeat +$ echo 't&((t>>7)-t)&t>>8' | python ./bytebeat_compiler.py - -p 44100 -v +:: C bytebeat generator: compiler unit Compiling :: C bytebeat generator runtime unit diff --git a/bytebeat_compiler.py b/bytebeat_compiler.py index 7f82f7b..d44217a 100644 --- a/bytebeat_compiler.py +++ b/bytebeat_compiler.py @@ -384,4 +384,10 @@ if __name__ == "__main__": ] print(" ".join(command), flush=True) + if subprocess.run(command).returncode != 0: + exit(1) + + command = [OUTPUT_FILE] + print(" ".join(command), flush=True) + exit(subprocess.run(command).returncode)