Skip to content

Commit

Permalink
mark fasmarm executable, remove that part of script, ignore pycache
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrberry committed Oct 18, 2020
1 parent 5d8867a commit 2c38c6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 1 @@
__pycache__/
Empty file modified FASMARM/fasmarm
100644 → 100755
Empty file.
17 changes: 3 additions & 14 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 20,19 @@
"win32": "FASMARM.EXE",
"linux": "fasmarm",
"linux2": "fasmarm",
"darwin": "fasmarm.o"
"darwin": "fasmarm.o",
}

if sys.platform not in executable:
raise OSError("OS not supported")

if "linux" in sys.platform or "darwin" in sys.platform:
print("chmod x ./FASMARM/fasmarm")
chmod = sp.run("chmod x ./FASMARM/fasmarm")
if chmod.stdout:
print(chmod.stdout)
if chmod.returncode != 0:
print(chmod.sterr)
raise OSError("Could not chmod ./FASMARM/fasmarm")


completed_process = sp.run(
[
f"./FASMARM/{executable[sys.platform]}",
str(Path("./asm/main.asm").absolute()),
str(Path("./main.gba").absolute())
]
str(Path("./main.gba").absolute()),
]
)

if completed_process.returncode != 0 or completed_process.stderr:
raise Exception(completed_process.stderr)

0 comments on commit 2c38c6c

Please sign in to comment.