Skip to content

Commit ea8617e

Browse files
paulgoetzeoprypin
authored andcommitted
Allow running generate.sh with customized header path
1 parent ac5d0f1 commit ea8617e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

generate/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
cd $(dirname $0)
33

4-
python3 headers.py
4+
python3 headers.py $1
55
python3 generate.py
66
cd ..
77
cp -r generate/*.cr src/

generate/headers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121

2222
import os.path
2323
import re
24+
import sys
2425

25-
26-
inc_path = 'CSFML/include'
26+
try:
27+
inc_path = sys.argv[1]
28+
except IndexError:
29+
inc_path = 'CSFML/include'
2730

2831
skip = 'WindowHandle'.split()
2932

0 commit comments

Comments
 (0)