aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-04-19 09:41:41 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-04-19 09:41:41 -0700
commit49b1ee8fc11fc3aa93b39146fdff0a33ef27a74b (patch)
treeab5c24cbcdfb848481cd35aeb1fca817e46f23a7
parentdf2a9476a1767bdce83e081470b31ffb89749034 (diff)
chore: added script to update build directory
-rw-r--r--.gitignore1
-rwxr-xr-xbin/update_dirs.py14
2 files changed, 14 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 5238af5..8a7f852 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-bin/
lib/
dep/
build/
diff --git a/bin/update_dirs.py b/bin/update_dirs.py
new file mode 100755
index 0000000..0f0e0f2
--- /dev/null
+++ b/bin/update_dirs.py
@@ -0,0 +1,14 @@
+#!/bin/python
+
+import os
+
+ROOT = "sys"
+BUILD = "build"
+IGNORED = ["build", "include", "lib", "bin", ".git", "vendor", "obj", "dep"]
+
+if __name__ == "__main__":
+ for root, dirs, _ in os.walk(ROOT):
+ dirs[:] = [d for d in dirs if d not in IGNORED]
+ blddir = f"{BUILD}/{root[len(ROOT)+1:]}"
+ if not os.path.exists(blddir):
+ os.mkdir(blddir)