Skip to content

Commit f61d605

Browse files
committed
.
1 parent cc1927c commit f61d605

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

clone.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
def main(argv):
1111
for repo, release in asyncio.run(sdl3.SDL_GET_LATEST_RELEASES()).items():
1212
if repo not in os.listdir():
13-
dev = release is None or not release.split("-")[1].startswith("3")
14-
print("\33[32m", f"info: cloning '{repo}'", f"with release '{release}'..." if not dev else "without any release...", "\33[0m", sep = "", flush = True)
15-
subprocess.run(["git", "clone", f"https://github.com/libsdl-org/{repo}.git", "--recursive"], shell = sdl3.SDL_SYSTEM in ["Windows"])
16-
if not dev: subprocess.run(["git", "switch", f"tags/{release}"], cwd = repo, shell = sdl3.SDL_SYSTEM in ["Windows"])
13+
print("\33[32m", f"info: cloning '{repo}'", "without any release..." if (dev := release is None or not release.split("-")[1].startswith("3")) else f"with release '{release}'...", "\33[0m", sep = "", flush = True)
14+
subprocess.run(["git", "clone", f"https://github.com/libsdl-org/{repo}.git", "--recursive"] + ([] if dev else ["--branch", release]), shell = sdl3.SDL_SYSTEM in ["Windows"])
1715

1816
else:
1917
print("\33[35m", f"warning: passing '{repo}' because it already exists...", "\33[0m", sep = "", flush = True)

0 commit comments

Comments
 (0)