mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-25 10:19:36 +03:00
[WS] Check if tup exists
git-svn-id: svn://kolibrios.org@9392 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1166af8067
commit
b0998a3b47
@ -3,6 +3,7 @@
|
||||
# Published under MIT license
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from lib.network import download
|
||||
from lib.logging import log
|
||||
@ -25,12 +26,19 @@ def create_workspace_script(name, script_to_execute):
|
||||
log("Done")
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Check if we have tup installed
|
||||
if shutil.which("tup") == None:
|
||||
print("Sorry, I haven't found tup")
|
||||
print("Possible solutions:")
|
||||
print("- Install tup")
|
||||
print("- Add tup installation folder to PATH")
|
||||
exit()
|
||||
# Initalize tup here
|
||||
os.system("tup init")
|
||||
# Create (in current directory) scripts that execute
|
||||
# the same named scripts from _tools/workspace
|
||||
tools_workspace_run_py = os.path.join(tools_workspace, "run.py")
|
||||
tools_workspace_build_py = os.path.join(tools_workspace, "build.py")
|
||||
create_workspace_script("run.py", tools_workspace_run_py)
|
||||
create_workspace_script("build.py", tools_workspace_build_py)
|
||||
# Initalize tup here
|
||||
# TODO: Do anything if tup doesn't exist
|
||||
os.system("tup init")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user