aboutsummaryrefslogtreecommitdiff
path: root/bin/updateblddir
diff options
context:
space:
mode:
Diffstat (limited to 'bin/updateblddir')
-rwxr-xr-xbin/updateblddir15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/updateblddir b/bin/updateblddir
new file mode 100755
index 0000000..34f148d
--- /dev/null
+++ b/bin/updateblddir
@@ -0,0 +1,15 @@
+#!/bin/python
+
+import os
+
+ROOT = "/home/nolln/root"
+SRC = "sys"
+BUILD = "build"
+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]
+ blddir = f"{ROOT}/{BUILD}/{root[len(ROOT)+len(SRC)+2:]}"
+ if not os.path.exists(blddir):
+ os.mkdir(blddir)