aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/updatedirs17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/updatedirs b/bin/updatedirs
new file mode 100755
index 0000000..bb646e0
--- /dev/null
+++ b/bin/updatedirs
@@ -0,0 +1,17 @@
+#!/bin/python
+
+import os
+
+ROOT = "/home/nolln/root"
+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)