From 4bee1c911c0a710da47b62a31e84535d2e0b7c76 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Thu, 22 Apr 2021 09:48:30 -0700 Subject: chore(organize): restructured build to allow for parallel projects to sys functionality --- bin/updatedirs | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'bin/updatedirs') diff --git a/bin/updatedirs b/bin/updatedirs index bb646e0..1ec2e25 100755 --- a/bin/updatedirs +++ b/bin/updatedirs @@ -3,15 +3,22 @@ import os ROOT = "/home/nolln/root" -SRC = "sys" -BUILD = "build" -TEST = "test" +SRCS = ["src", "sys"] +BUILD = ".build" +TEST = ".test" IGNORED = ["build", "include", "lib", "bin", ".git", "vendor", "obj", "dep", ".generated"] if __name__ == "__main__": - for root, dirs, _ in os.walk(f"{ROOT}/{SRC}"): - dirs[:] = [d for d in dirs if d not in IGNORED] - for newroot in [BUILD, TEST]: - blddir = f"{ROOT}/{newroot}/{root[len(ROOT)+len(SRC)+2:]}" - if not os.path.exists(blddir): - os.mkdir(blddir) + if not os.path.exists(BUILD): + os.mkdir(BUILD) + + if not os.path.exists(TEST): + os.mkdir(TEST) + + for SRC in SRCS: + for root, dirs, _ in os.walk(f"{ROOT}/{SRC}"): + dirs[:] = [d for d in dirs if d not in IGNORED] + for newroot in [BUILD, TEST]: + blddir = f"{ROOT}/{newroot}/{SRC}/{root[len(ROOT)+len(SRC)+2:]}" + if not os.path.exists(blddir): + os.mkdir(blddir) -- cgit v1.2.1