mirror of
https://github.com/nophead/Mendel90.git
synced 2025-01-16 20:38:15 +01:00
de869520a9
Corrected usage messages to include dibond.
24 lines
550 B
Python
24 lines
550 B
Python
#!/usr/bin/env python
|
|
|
|
from __future__ import print_function
|
|
|
|
import sys
|
|
|
|
def set_machine(machine):
|
|
text = "include <%s_config.scad>\n" % machine;
|
|
f = open("scad/conf/machine.scad","rt")
|
|
line = f.read()
|
|
f.close()
|
|
if line != text:
|
|
f = open("scad/conf/machine.scad","wt")
|
|
f. write(text);
|
|
f.close()
|
|
|
|
if __name__ == '__main__':
|
|
args = len(sys.argv)
|
|
if args == 2:
|
|
set_machine(sys.argv[1])
|
|
else:
|
|
print("usage: set_machine dibond|mendel|sturdy|huxley|your_machine")
|
|
sys.exit(1)
|