diff options
author | Nicholas <nbnoll@eml.cc> | 2021-11-12 09:22:01 -0800 |
---|---|---|
committer | Nicholas <nbnoll@eml.cc> | 2021-11-12 09:22:01 -0800 |
commit | ce05175372a9ddca1a225db0765ace1127a39293 (patch) | |
tree | 5988b4d4f6b402e4953945886fc90aae11203df6 /bin/updatedirs | |
parent | b375f3cdedb5b0e08745d100b40e38d2f8396a58 (diff) |
chore: simplified organizational structurelaptop
Diffstat (limited to 'bin/updatedirs')
-rwxr-xr-x | bin/updatedirs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/bin/updatedirs b/bin/updatedirs index cde7a6b..b304251 100755 --- a/bin/updatedirs +++ b/bin/updatedirs @@ -2,10 +2,10 @@ import os ROOT = "/home/nolln/u" -SRCS = ["src", "sys"] -BUILD = ".build" -TEST = ".test" -IGNORED = ["build", "include", "lib", "bin", ".git", "vendor", "obj", "dep", ".generated"] +SRC = "src" +BUILD = "obj" +TEST = "test" +IGNORED = ["include", "lib", "bin", ".git", "vendor", "obj", ".dep"] if __name__ == "__main__": if not os.path.exists(BUILD): @@ -14,10 +14,9 @@ if __name__ == "__main__": 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) + 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) |