/bin/twnbuild: shortening
This commit is contained in:
		@@ -28,9 +28,8 @@ if "--" in argv:
 | 
			
		||||
 | 
			
		||||
# if no root cmake file is present, infer it from `twn.toml:game.interpreter`
 | 
			
		||||
if not Path("CMakeLists.txt").is_file():
 | 
			
		||||
    with open("data/twn.toml", "rb") as f:
 | 
			
		||||
        config = tomllib.load(f)
 | 
			
		||||
        cmake += ["-S", expandvars(config["game"]["interpreter"])]
 | 
			
		||||
    config = tomllib.loads(Path("data/twn.toml").read_text())
 | 
			
		||||
    cmake += ["-S", expandvars(config["game"]["interpreter"])]
 | 
			
		||||
 | 
			
		||||
run(cmake, check=True)
 | 
			
		||||
run(["cmake", "--build", "build", "--parallel"], check=True)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user