2019-05-02 17:10:48 +00:00
|
|
|
import os;
|
|
|
|
import platform;
|
|
|
|
import re;
|
|
|
|
import sys;
|
|
|
|
import subprocess;
|
|
|
|
import getpass;
|
|
|
|
|
|
|
|
|
|
|
|
OS = "MS-DOS";
|
|
|
|
|
|
|
|
if sys.version_info[0] > 2:
|
|
|
|
raise Exception("inferior version detected");
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
# todo learn regex
|
|
|
|
if (re.match("kevin", getpass.getuser().lower())):
|
|
|
|
raise Exception("Kevin found exception")
|
|
|
|
|
|
|
|
if (os.path.isdir("/etc/")):
|
|
|
|
if (os.path.isdir("/Users/")):
|
|
|
|
print "MacOS";
|
|
|
|
else:
|
|
|
|
print "linux";
|
|
|
|
|
|
|
|
os.environ['step_count'] = "0"
|
|
|
|
|
2019-05-04 21:59:02 +00:00
|
|
|
os.execv("/usr/bin/make", ["clean"])
|
2019-05-02 17:10:48 +00:00
|
|
|
elif (os.pardir.isdir("C:\\Windows\\")):
|
|
|
|
print "windows";
|
|
|
|
|
|
|
|
if (re.match("Windows-8", platform.platform())):
|
|
|
|
raise NotImplementedError;
|
|
|
|
|
|
|
|
subprocess.run(["Makefile.bat"]);
|
|
|
|
|