Subversion Repositories Kolibri OS

Rev

Rev 9390 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9390 Rev 9392
Line 1... Line 1...
1
#!/usr/bin/python3
1
#!/usr/bin/python3
2
# Copyright Magomed Kostoev
2
# Copyright Magomed Kostoev
3
# Published under MIT license
3
# Published under MIT license
Line 4... Line 4...
4
 
4
 
-
 
5
import os
Line 5... Line 6...
5
import os
6
import shutil
6
 
7
 
7
from lib.network import download
8
from lib.network import download
Line 23... Line 24...
23
        f.write(script_contents)
24
        f.write(script_contents)
Line 24... Line 25...
24
 
25
 
Line 25... Line 26...
25
    log("Done")
26
    log("Done")
-
 
27
 
-
 
28
if __name__ == "__main__":
-
 
29
    # Check if we have tup installed
-
 
30
    if shutil.which("tup") == None:
-
 
31
        print("Sorry, I haven't found tup")
-
 
32
        print("Possible solutions:")
-
 
33
        print("- Install tup")
-
 
34
        print("- Add tup installation folder to PATH")
-
 
35
        exit()
26
 
36
    # Initalize tup here
27
if __name__ == "__main__":
37
    os.system("tup init")
28
    # Create (in current directory) scripts that execute
38
    # Create (in current directory) scripts that execute
29
    # the same named scripts from _tools/workspace
39
    # the same named scripts from _tools/workspace
30
    tools_workspace_run_py = os.path.join(tools_workspace, "run.py")
40
    tools_workspace_run_py = os.path.join(tools_workspace, "run.py")
31
    tools_workspace_build_py = os.path.join(tools_workspace, "build.py")
41
    tools_workspace_build_py = os.path.join(tools_workspace, "build.py")
32
    create_workspace_script("run.py", tools_workspace_run_py)
-
 
33
    create_workspace_script("build.py", tools_workspace_build_py)
-
 
34
    # Initalize tup here
-
 
-
 
42
    create_workspace_script("run.py", tools_workspace_run_py)