aboutsummaryrefslogtreecommitdiff
path: root/bin/updateblddir
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-04-19 10:06:21 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-04-19 10:06:21 -0700
commit5a25f38de6d3e2506838191c55af94cb56c9f641 (patch)
tree5dc6b2678fc76502c148c87c419c158680c3c4c5 /bin/updateblddir
parentef512a454184bfbcdf3ac6b295e9fb5bf7e26841 (diff)
feat: quality of life scripts to initialize make rules
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)